// $ANTLR 3.2 Sep 23, 2009 12:02:23 X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g 2010-12-05 18:26:15

// The variable 'variable' is assigned but its value is never used.
#pragma warning disable 168, 219
// Unreachable code detected.
#pragma warning disable 162


	using System.Collections.Generic;
	using PSLib.Parsing.Lua.ObjectModel;
	using PSLib.Parsing.Lua.Context;
	using PSLib.Parsing.Common;


using System;
using Antlr.Runtime;
using IList 		= System.Collections.IList;
using ArrayList 	= System.Collections.ArrayList;
using Stack 		= Antlr.Runtime.Collections.StackList;

using IDictionary	= System.Collections.IDictionary;
using Hashtable 	= System.Collections.Hashtable;
namespace PSLib.Parsing.Lua
{
public partial class LuaParser : Parser
{
    public static readonly string[] tokenNames = new string[] 
	{
        "<invalid>", 
		"<EOR>", 
		"<DOWN>", 
		"<UP>", 
		"NAME", 
		"INT", 
		"FLOAT", 
		"EXP", 
		"HEX", 
		"NORMALSTRING", 
		"CHARSTRING", 
		"LONGSTRING", 
		"LINE_BREAK", 
		"LINE_COMMENT", 
		"COMMENT", 
		"WS", 
		"HEX_DIGIT", 
		"UNICODE_ESC", 
		"OCTAL_ESC", 
		"ESC_SEQ", 
		"';'", 
		"'local'", 
		"'='", 
		"'function'", 
		"'for'", 
		"','", 
		"'do'", 
		"'end'", 
		"'in'", 
		"'if'", 
		"'then'", 
		"'elseif'", 
		"'else'", 
		"'return'", 
		"'break'", 
		"'repeat'", 
		"'until'", 
		"'while'", 
		"'.'", 
		"':'", 
		"'nil'", 
		"'false'", 
		"'true'", 
		"'...'", 
		"'+'", 
		"'-'", 
		"'*'", 
		"'/'", 
		"'^'", 
		"'%'", 
		"'..'", 
		"'<'", 
		"'<='", 
		"'>'", 
		"'>='", 
		"'=='", 
		"'~='", 
		"'and'", 
		"'or'", 
		"'('", 
		"')'", 
		"'['", 
		"']'", 
		"'{'", 
		"'}'", 
		"'not'", 
		"'#'"
    };

    public const int T__66 = 66;
    public const int T__64 = 64;
    public const int T__29 = 29;
    public const int T__65 = 65;
    public const int T__28 = 28;
    public const int T__62 = 62;
    public const int T__27 = 27;
    public const int T__63 = 63;
    public const int T__26 = 26;
    public const int T__25 = 25;
    public const int T__24 = 24;
    public const int T__23 = 23;
    public const int T__22 = 22;
    public const int T__21 = 21;
    public const int T__20 = 20;
    public const int OCTAL_ESC = 18;
    public const int FLOAT = 6;
    public const int T__61 = 61;
    public const int T__60 = 60;
    public const int EOF = -1;
    public const int T__55 = 55;
    public const int T__56 = 56;
    public const int T__57 = 57;
    public const int NAME = 4;
    public const int T__58 = 58;
    public const int ESC_SEQ = 19;
    public const int T__51 = 51;
    public const int T__52 = 52;
    public const int T__53 = 53;
    public const int T__54 = 54;
    public const int EXP = 7;
    public const int HEX = 8;
    public const int T__59 = 59;
    public const int COMMENT = 14;
    public const int T__50 = 50;
    public const int T__42 = 42;
    public const int T__43 = 43;
    public const int T__40 = 40;
    public const int T__41 = 41;
    public const int T__46 = 46;
    public const int T__47 = 47;
    public const int T__44 = 44;
    public const int T__45 = 45;
    public const int LINE_COMMENT = 13;
    public const int T__48 = 48;
    public const int T__49 = 49;
    public const int UNICODE_ESC = 17;
    public const int HEX_DIGIT = 16;
    public const int CHARSTRING = 10;
    public const int INT = 5;
    public const int LONGSTRING = 11;
    public const int T__30 = 30;
    public const int NORMALSTRING = 9;
    public const int T__31 = 31;
    public const int LINE_BREAK = 12;
    public const int T__32 = 32;
    public const int WS = 15;
    public const int T__33 = 33;
    public const int T__34 = 34;
    public const int T__35 = 35;
    public const int T__36 = 36;
    public const int T__37 = 37;
    public const int T__38 = 38;
    public const int T__39 = 39;

    // delegates
    // delegators



        public LuaParser(ITokenStream input)
    		: this(input, new RecognizerSharedState()) {
        }

        public LuaParser(ITokenStream input, RecognizerSharedState state)
    		: base(input, state) {
            InitializeCyclicDFAs();
            this.state.ruleMemo = new Hashtable[114+1];
             
             
        }
        

    override public string[] TokenNames {
		get { return LuaParser.tokenNames; }
    }

    override public string GrammarFileName {
		get { return "X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g"; }
    }


    	public ContextProvider ContextProvider 
    	{ 
    		get 
    		{ 
    			if(contextProvider == null) contextProvider = new ContextProvider(this);
    			return contextProvider; 
    		} 
    	}
    	internal ContextProvider contextProvider = null;
    	
    	public ObjectModelProvider ObjectModelProvider { get { return objectModelProvider; } }
    	internal ObjectModelProvider objectModelProvider = new ObjectModelProvider();
    		
    	internal void SEn(string name)
    	{
    		objectModelProvider.EnterScope(name,this.CurrentElementPosition);
    	}
    	internal void SEx()
    	{
    		objectModelProvider.ExitScope(this.PrevElementPositionEnd);
    	}
    	
    	internal ElementPosition CurrentElementPosition { get { return GetElementPosition(this.input.Index());} }
    	internal ElementPosition PrevElementPositionStart { get { return GetElementPosition(this.input.Index() - 1);} }
    	internal ElementPosition PrevElementPositionEnd { get { return GetElementPosition(this.input.Index() - 1,true); } }
    		
    	internal ElementPosition GetElementPosition(int tokenIndex, bool endPos = false)
       	{
    		int line = 0;
    		int charPosition = 0;
    		if (tokenIndex < this.input.Count)
    		{
    		    IToken token = this.input.Get(tokenIndex);
    		    line = token.Line;
    		    charPosition = token.CharPositionInLine;
    		    if(endPos) charPosition+= token.Text.Length;
    		}
    		else
    		{
    		    line = -1;
    		    charPosition = -1;
    		}
    		
    	    return new ElementPosition(line, charPosition);
       	}
    	
    	internal static class Temp
    	{
    		internal static Stack<Variable> currentVariableStack = new Stack<Variable>();
    		internal static Stack<Stack<Variable>> currentVariablesTreeStack = new Stack<Stack<Variable>>();
    		internal static string currentVariableKey = null;
    		internal static ValueReference currentValueReference = null;
    		internal static bool? currentFunctionSelfHidden = null;
    		internal static ValueReference currentFunctionSelfValueReference = null;
    	}
    	



    // $ANTLR start "program"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:114:1: program : ( chunk )? EOF ;
    public void program() // throws RecognitionException [1]
    {   
        int program_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 1) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:114:9: ( ( chunk )? EOF )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:114:11: ( chunk )? EOF
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:114:11: ( chunk )?
            	int alt1 = 2;
            	int LA1_0 = input.LA(1);

            	if ( (LA1_0 == NAME || LA1_0 == 21 || (LA1_0 >= 23 && LA1_0 <= 24) || LA1_0 == 26 || LA1_0 == 29 || (LA1_0 >= 33 && LA1_0 <= 35) || LA1_0 == 37 || LA1_0 == 59) )
            	{
            	    alt1 = 1;
            	}
            	else if ( (LA1_0 == EOF) )
            	{
            	    int LA1_2 = input.LA(2);

            	    if ( (synpred1_Lua()) )
            	    {
            	        alt1 = 1;
            	    }
            	}
            	switch (alt1) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:114:12: chunk
            	        {
            	        	if ( (state.backtracking==0) )
            	        	{
            	        	  SEn("Global block");
            	        	}
            	        	PushFollow(FOLLOW_chunk_in_program120);
            	        	chunk();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;
            	        	if ( (state.backtracking==0) )
            	        	{
            	        	  SEx();
            	        	}

            	        }
            	        break;

            	}

            	Match(input,EOF,FOLLOW_EOF_in_program127); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 1, program_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "program"


    // $ANTLR start "chunk"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:1: chunk : ( stat ( ';' )? )* ( laststat ( ';' )? )? ;
    public void chunk() // throws RecognitionException [1]
    {   
        int chunk_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 2) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:7: ( ( stat ( ';' )? )* ( laststat ( ';' )? )? )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:9: ( stat ( ';' )? )* ( laststat ( ';' )? )?
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:9: ( stat ( ';' )? )*
            	do 
            	{
            	    int alt3 = 2;
            	    int LA3_0 = input.LA(1);

            	    if ( (LA3_0 == NAME || LA3_0 == 21 || (LA3_0 >= 23 && LA3_0 <= 24) || LA3_0 == 26 || LA3_0 == 29 || LA3_0 == 35 || LA3_0 == 37 || LA3_0 == 59) )
            	    {
            	        alt3 = 1;
            	    }


            	    switch (alt3) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:10: stat ( ';' )?
            			    {
            			    	PushFollow(FOLLOW_stat_in_chunk135);
            			    	stat();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return ;
            			    	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:15: ( ';' )?
            			    	int alt2 = 2;
            			    	int LA2_0 = input.LA(1);

            			    	if ( (LA2_0 == 20) )
            			    	{
            			    	    alt2 = 1;
            			    	}
            			    	switch (alt2) 
            			    	{
            			    	    case 1 :
            			    	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:16: ';'
            			    	        {
            			    	        	Match(input,20,FOLLOW_20_in_chunk138); if (state.failed) return ;

            			    	        }
            			    	        break;

            			    	}


            			    }
            			    break;

            			default:
            			    goto loop3;
            	    }
            	} while (true);

            	loop3:
            		;	// Stops C# compiler whining that label 'loop3' has no statements

            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:24: ( laststat ( ';' )? )?
            	int alt5 = 2;
            	int LA5_0 = input.LA(1);

            	if ( ((LA5_0 >= 33 && LA5_0 <= 34)) )
            	{
            	    alt5 = 1;
            	}
            	switch (alt5) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:25: laststat ( ';' )?
            	        {
            	        	PushFollow(FOLLOW_laststat_in_chunk145);
            	        	laststat();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;
            	        	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:34: ( ';' )?
            	        	int alt4 = 2;
            	        	int LA4_0 = input.LA(1);

            	        	if ( (LA4_0 == 20) )
            	        	{
            	        	    alt4 = 1;
            	        	}
            	        	switch (alt4) 
            	        	{
            	        	    case 1 :
            	        	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:115:35: ';'
            	        	        {
            	        	        	Match(input,20,FOLLOW_20_in_chunk148); if (state.failed) return ;

            	        	        }
            	        	        break;

            	        	}


            	        }
            	        break;

            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 2, chunk_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "chunk"


    // $ANTLR start "block"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:1: block : ( ( chunk )? ) ;
    public void block() // throws RecognitionException [1]
    {   
        int block_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 3) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:7: ( ( ( chunk )? ) )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:9: ( ( chunk )? )
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:9: ( ( chunk )? )
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:11: ( chunk )?
            	{
            		// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:11: ( chunk )?
            		int alt6 = 2;
            		switch ( input.LA(1) ) 
            		{
            		    case NAME:
            		    case 21:
            		    case 23:
            		    case 24:
            		    case 26:
            		    case 29:
            		    case 33:
            		    case 34:
            		    case 35:
            		    case 37:
            		    case 59:
            		    	{
            		        alt6 = 1;
            		        }
            		        break;
            		    case 27:
            		    	{
            		        int LA6_2 = input.LA(2);

            		        if ( (synpred6_Lua()) )
            		        {
            		            alt6 = 1;
            		        }
            		        }
            		        break;
            		    case 31:
            		    	{
            		        int LA6_3 = input.LA(2);

            		        if ( (synpred6_Lua()) )
            		        {
            		            alt6 = 1;
            		        }
            		        }
            		        break;
            		    case 32:
            		    	{
            		        int LA6_4 = input.LA(2);

            		        if ( (synpred6_Lua()) )
            		        {
            		            alt6 = 1;
            		        }
            		        }
            		        break;
            		    case 36:
            		    	{
            		        int LA6_5 = input.LA(2);

            		        if ( (synpred6_Lua()) )
            		        {
            		            alt6 = 1;
            		        }
            		        }
            		        break;
            		    case EOF:
            		    	{
            		        int LA6_6 = input.LA(2);

            		        if ( (synpred6_Lua()) )
            		        {
            		            alt6 = 1;
            		        }
            		        }
            		        break;
            		}

            		switch (alt6) 
            		{
            		    case 1 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:0:0: chunk
            		        {
            		        	PushFollow(FOLLOW_chunk_in_block163);
            		        	chunk();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return ;

            		        }
            		        break;

            		}


            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 3, block_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "block"


    // $ANTLR start "stat"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:119:1: stat : ( var_assignment | functioncall | do_block | while_stat | repeat_stat | if_stat | for_stat | func_definition | var_definition );
    public void stat() // throws RecognitionException [1]
    {   
        int stat_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 4) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:119:7: ( var_assignment | functioncall | do_block | while_stat | repeat_stat | if_stat | for_stat | func_definition | var_definition )
            int alt7 = 9;
            alt7 = dfa7.Predict(input);
            switch (alt7) 
            {
                case 1 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:119:9: var_assignment
                    {
                    	PushFollow(FOLLOW_var_assignment_in_stat176);
                    	var_assignment();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:120:5: functioncall
                    {
                    	PushFollow(FOLLOW_functioncall_in_stat182);
                    	functioncall();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 3 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:121:5: do_block
                    {
                    	PushFollow(FOLLOW_do_block_in_stat189);
                    	do_block();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 4 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:122:5: while_stat
                    {
                    	PushFollow(FOLLOW_while_stat_in_stat195);
                    	while_stat();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 5 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:123:5: repeat_stat
                    {
                    	PushFollow(FOLLOW_repeat_stat_in_stat201);
                    	repeat_stat();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 6 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:124:5: if_stat
                    {
                    	PushFollow(FOLLOW_if_stat_in_stat207);
                    	if_stat();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 7 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:125:5: for_stat
                    {
                    	PushFollow(FOLLOW_for_stat_in_stat213);
                    	for_stat();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 8 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:126:5: func_definition
                    {
                    	PushFollow(FOLLOW_func_definition_in_stat219);
                    	func_definition();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 9 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:127:5: var_definition
                    {
                    	PushFollow(FOLLOW_var_definition_in_stat225);
                    	var_definition();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 4, stat_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "stat"


    // $ANTLR start "var_definition"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:129:1: var_definition : 'local' nl= namelist ( '=' el= explist1 )? ;
    public void var_definition() // throws RecognitionException [1]
    {   
        int var_definition_StartIndex = input.Index();
        List<Variable> nl = default(List<Variable>);

        List<ValueReferenceRevision> el = default(List<ValueReferenceRevision>);


        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 5) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:129:15: ( 'local' nl= namelist ( '=' el= explist1 )? )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:129:17: 'local' nl= namelist ( '=' el= explist1 )?
            {
            	Match(input,21,FOLLOW_21_in_var_definition234); if (state.failed) return ;
            	PushFollow(FOLLOW_namelist_in_var_definition238);
            	nl = namelist();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:129:37: ( '=' el= explist1 )?
            	int alt8 = 2;
            	int LA8_0 = input.LA(1);

            	if ( (LA8_0 == 22) )
            	{
            	    alt8 = 1;
            	}
            	switch (alt8) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:129:38: '=' el= explist1
            	        {
            	        	Match(input,22,FOLLOW_22_in_var_definition241); if (state.failed) return ;
            	        	PushFollow(FOLLOW_explist1_in_var_definition245);
            	        	el = explist1();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;

            	        }
            	        break;

            	}

            	if ( (state.backtracking==0) )
            	{

            	  						foreach(var item in nl)
            	  							objectModelProvider.CurrentScope.AddVariable(item);
            	  							
            	  						Helper.AssignVariableDefinition(nl, el);
            	  					
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 5, var_definition_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "var_definition"


    // $ANTLR start "var_assignment"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:137:1: var_assignment : vl= varlist1 '=' el= explist1 ;
    public void var_assignment() // throws RecognitionException [1]
    {   
        int var_assignment_StartIndex = input.Index();
        List<Variable> vl = default(List<Variable>);

        List<ValueReferenceRevision> el = default(List<ValueReferenceRevision>);


        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 6) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:137:16: (vl= varlist1 '=' el= explist1 )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:137:18: vl= varlist1 '=' el= explist1
            {
            	PushFollow(FOLLOW_varlist1_in_var_assignment265);
            	vl = varlist1();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	Match(input,22,FOLLOW_22_in_var_assignment267); if (state.failed) return ;
            	PushFollow(FOLLOW_explist1_in_var_assignment271);
            	el = explist1();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{

            	  						Helper.AssignVariableDefinition(vl, el);
            	  					
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 6, var_assignment_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "var_assignment"


    // $ANTLR start "func_definition"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:142:1: func_definition : ( 'local' 'function' n= NAME fb1= func_body | 'function' fVar= funcname fb2= func_body );
    public void func_definition() // throws RecognitionException [1]
    {   
        int func_definition_StartIndex = input.Index();
        IToken n = null;
        ValueReference fb1 = default(ValueReference);

        Variable fVar = default(Variable);

        ValueReference fb2 = default(ValueReference);


        Variable variable = null; ElementPosition position = this.CurrentElementPosition; 
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 7) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:143:4: ( 'local' 'function' n= NAME fb1= func_body | 'function' fVar= funcname fb2= func_body )
            int alt9 = 2;
            int LA9_0 = input.LA(1);

            if ( (LA9_0 == 21) )
            {
                alt9 = 1;
            }
            else if ( (LA9_0 == 23) )
            {
                alt9 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return ;}
                NoViableAltException nvae_d9s0 =
                    new NoViableAltException("", 9, 0, input);

                throw nvae_d9s0;
            }
            switch (alt9) 
            {
                case 1 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:143:6: 'local' 'function' n= NAME fb1= func_body
                    {
                    	Match(input,21,FOLLOW_21_in_func_definition293); if (state.failed) return ;
                    	Match(input,23,FOLLOW_23_in_func_definition295); if (state.failed) return ;
                    	n=(IToken)Match(input,NAME,FOLLOW_NAME_in_func_definition299); if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{

                    	  						variable = objectModelProvider.CurrentScope.GetVariable(n.Text, true);
                    	  						SEn("Function definition block");
                    	  					
                    	}
                    	PushFollow(FOLLOW_func_body_in_func_definition319);
                    	fb1 = func_body();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{

                    	  				   		SEx();
                    	  				   		if(fb1 != null)
                    	  				   		{
                    	  				   			variable.SetValue(new ValueReferenceRevision(position,fb1));
                    	  				   		}
                    	  				   	
                    	}

                    }
                    break;
                case 2 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:156:7: 'function' fVar= funcname fb2= func_body
                    {
                    	Match(input,23,FOLLOW_23_in_func_definition338); if (state.failed) return ;
                    	PushFollow(FOLLOW_funcname_in_func_definition342);
                    	fVar = funcname();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{

                    	  						variable = fVar;
                    	  						SEn("Function definition block");
                    	  					
                    	}
                    	PushFollow(FOLLOW_func_body_in_func_definition359);
                    	fb2 = func_body();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{

                    	  						SEx();
                    	  						if(fb2 != null && variable != null)
                    	  				   		{
                    	  				   			variable.SetValue(new ValueReferenceRevision(position,fb2));
                    	  				   		}
                    	  					
                    	}

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 7, func_definition_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "func_definition"


    // $ANTLR start "for_stat"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:170:1: for_stat : ( 'for' n= NAME '=' e= exp ',' exp ( ',' exp )? 'do' block 'end' | 'for' nl= namelist 'in' explist1 'do' block 'end' );
    public void for_stat() // throws RecognitionException [1]
    {   
        int for_stat_StartIndex = input.Index();
        IToken n = null;
        List<ValueReferenceRevision> e = default(List<ValueReferenceRevision>);

        List<Variable> nl = default(List<Variable>);


        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 8) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:170:10: ( 'for' n= NAME '=' e= exp ',' exp ( ',' exp )? 'do' block 'end' | 'for' nl= namelist 'in' explist1 'do' block 'end' )
            int alt11 = 2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0 == 24) )
            {
                int LA11_1 = input.LA(2);

                if ( (LA11_1 == NAME) )
                {
                    int LA11_2 = input.LA(3);

                    if ( (LA11_2 == 22) )
                    {
                        alt11 = 1;
                    }
                    else if ( (LA11_2 == 25 || LA11_2 == 28) )
                    {
                        alt11 = 2;
                    }
                    else 
                    {
                        if ( state.backtracking > 0 ) {state.failed = true; return ;}
                        NoViableAltException nvae_d11s2 =
                            new NoViableAltException("", 11, 2, input);

                        throw nvae_d11s2;
                    }
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return ;}
                    NoViableAltException nvae_d11s1 =
                        new NoViableAltException("", 11, 1, input);

                    throw nvae_d11s1;
                }
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return ;}
                NoViableAltException nvae_d11s0 =
                    new NoViableAltException("", 11, 0, input);

                throw nvae_d11s0;
            }
            switch (alt11) 
            {
                case 1 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:170:13: 'for' n= NAME '=' e= exp ',' exp ( ',' exp )? 'do' block 'end'
                    {
                    	Match(input,24,FOLLOW_24_in_for_stat376); if (state.failed) return ;
                    	n=(IToken)Match(input,NAME,FOLLOW_NAME_in_for_stat380); if (state.failed) return ;
                    	Match(input,22,FOLLOW_22_in_for_stat382); if (state.failed) return ;
                    	PushFollow(FOLLOW_exp_in_for_stat386);
                    	e = exp();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	Match(input,25,FOLLOW_25_in_for_stat388); if (state.failed) return ;
                    	PushFollow(FOLLOW_exp_in_for_stat390);
                    	exp();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:170:44: ( ',' exp )?
                    	int alt10 = 2;
                    	int LA10_0 = input.LA(1);

                    	if ( (LA10_0 == 25) )
                    	{
                    	    alt10 = 1;
                    	}
                    	switch (alt10) 
                    	{
                    	    case 1 :
                    	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:170:45: ',' exp
                    	        {
                    	        	Match(input,25,FOLLOW_25_in_for_stat393); if (state.failed) return ;
                    	        	PushFollow(FOLLOW_exp_in_for_stat395);
                    	        	exp();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return ;

                    	        }
                    	        break;

                    	}

                    	Match(input,26,FOLLOW_26_in_for_stat399); if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{

                    	  						SEn("For block");
                    	  						
                    	  						Variable variable = new Variable();
                    	  						variable.Name = ((n != null) ? n.Text : null);
                    	  						variable.SetValue(e[0]);
                    	  						
                    	  						objectModelProvider.CurrentScope.AddVariable(variable);
                    	  					
                    	}
                    	PushFollow(FOLLOW_block_in_for_stat415);
                    	block();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{

                    	  						SEx();
                    	  					
                    	}
                    	Match(input,27,FOLLOW_27_in_for_stat431); if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:185:8: 'for' nl= namelist 'in' explist1 'do' block 'end'
                    {
                    	Match(input,24,FOLLOW_24_in_for_stat441); if (state.failed) return ;
                    	PushFollow(FOLLOW_namelist_in_for_stat445);
                    	nl = namelist();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	Match(input,28,FOLLOW_28_in_for_stat447); if (state.failed) return ;
                    	PushFollow(FOLLOW_explist1_in_for_stat449);
                    	explist1();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	Match(input,26,FOLLOW_26_in_for_stat451); if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{

                    	  							SEn("For block");
                    	  							foreach(var item in nl)
                    	  								objectModelProvider.CurrentScope.AddVariable(item);
                    	  						
                    	}
                    	PushFollow(FOLLOW_block_in_for_stat468);
                    	block();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	if ( (state.backtracking==0) )
                    	{
                    	  SEx();
                    	}
                    	Match(input,27,FOLLOW_27_in_for_stat472); if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 8, for_stat_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "for_stat"


    // $ANTLR start "if_stat"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:193:1: if_stat : 'if' exp 'then' block ( 'elseif' exp 'then' block )* ( 'else' block )? 'end' ;
    public void if_stat() // throws RecognitionException [1]
    {   
        int if_stat_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 9) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:193:10: ( 'if' exp 'then' block ( 'elseif' exp 'then' block )* ( 'else' block )? 'end' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:193:11: 'if' exp 'then' block ( 'elseif' exp 'then' block )* ( 'else' block )? 'end'
            {
            	Match(input,29,FOLLOW_29_in_if_stat485); if (state.failed) return ;
            	PushFollow(FOLLOW_exp_in_if_stat487);
            	exp();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	Match(input,30,FOLLOW_30_in_if_stat489); if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEn("If block");
            	}
            	PushFollow(FOLLOW_block_in_if_stat493);
            	block();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEx();
            	}
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:193:61: ( 'elseif' exp 'then' block )*
            	do 
            	{
            	    int alt12 = 2;
            	    int LA12_0 = input.LA(1);

            	    if ( (LA12_0 == 31) )
            	    {
            	        alt12 = 1;
            	    }


            	    switch (alt12) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:193:62: 'elseif' exp 'then' block
            			    {
            			    	Match(input,31,FOLLOW_31_in_if_stat498); if (state.failed) return ;
            			    	PushFollow(FOLLOW_exp_in_if_stat500);
            			    	exp();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return ;
            			    	Match(input,30,FOLLOW_30_in_if_stat502); if (state.failed) return ;
            			    	if ( (state.backtracking==0) )
            			    	{
            			    	  SEn("Elseif block");
            			    	}
            			    	PushFollow(FOLLOW_block_in_if_stat506);
            			    	block();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return ;
            			    	if ( (state.backtracking==0) )
            			    	{
            			    	  SEx();
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop12;
            	    }
            	} while (true);

            	loop12:
            		;	// Stops C# compiler whining that label 'loop12' has no statements

            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:193:122: ( 'else' block )?
            	int alt13 = 2;
            	int LA13_0 = input.LA(1);

            	if ( (LA13_0 == 32) )
            	{
            	    alt13 = 1;
            	}
            	switch (alt13) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:193:123: 'else' block
            	        {
            	        	Match(input,32,FOLLOW_32_in_if_stat513); if (state.failed) return ;
            	        	if ( (state.backtracking==0) )
            	        	{
            	        	  SEn("Else block");
            	        	}
            	        	PushFollow(FOLLOW_block_in_if_stat517);
            	        	block();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;
            	        	if ( (state.backtracking==0) )
            	        	{
            	        	  SEx();
            	        	}

            	        }
            	        break;

            	}

            	Match(input,27,FOLLOW_27_in_if_stat523); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 9, if_stat_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "if_stat"


    // $ANTLR start "laststat"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:195:1: laststat : ( 'return' ( explist1 )? | 'break' );
    public void laststat() // throws RecognitionException [1]
    {   
        int laststat_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 10) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:195:10: ( 'return' ( explist1 )? | 'break' )
            int alt15 = 2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0 == 33) )
            {
                alt15 = 1;
            }
            else if ( (LA15_0 == 34) )
            {
                alt15 = 2;
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return ;}
                NoViableAltException nvae_d15s0 =
                    new NoViableAltException("", 15, 0, input);

                throw nvae_d15s0;
            }
            switch (alt15) 
            {
                case 1 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:195:12: 'return' ( explist1 )?
                    {
                    	Match(input,33,FOLLOW_33_in_laststat531); if (state.failed) return ;
                    	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:195:21: ( explist1 )?
                    	int alt14 = 2;
                    	int LA14_0 = input.LA(1);

                    	if ( ((LA14_0 >= NAME && LA14_0 <= LONGSTRING) || LA14_0 == 23 || (LA14_0 >= 40 && LA14_0 <= 43) || LA14_0 == 45 || LA14_0 == 59 || LA14_0 == 63 || (LA14_0 >= 65 && LA14_0 <= 66)) )
                    	{
                    	    alt14 = 1;
                    	}
                    	switch (alt14) 
                    	{
                    	    case 1 :
                    	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:195:22: explist1
                    	        {
                    	        	PushFollow(FOLLOW_explist1_in_laststat534);
                    	        	explist1();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return ;

                    	        }
                    	        break;

                    	}


                    }
                    break;
                case 2 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:195:35: 'break'
                    {
                    	Match(input,34,FOLLOW_34_in_laststat540); if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 10, laststat_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "laststat"


    // $ANTLR start "repeat_stat"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:197:1: repeat_stat : 'repeat' block 'until' exp ;
    public void repeat_stat() // throws RecognitionException [1]
    {   
        int repeat_stat_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 11) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:197:13: ( 'repeat' block 'until' exp )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:197:15: 'repeat' block 'until' exp
            {
            	Match(input,35,FOLLOW_35_in_repeat_stat548); if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEn("Repeat block");
            	}
            	PushFollow(FOLLOW_block_in_repeat_stat552);
            	block();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEx();
            	}
            	Match(input,36,FOLLOW_36_in_repeat_stat556); if (state.failed) return ;
            	PushFollow(FOLLOW_exp_in_repeat_stat558);
            	exp();
            	state.followingStackPointer--;
            	if (state.failed) return ;

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 11, repeat_stat_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "repeat_stat"


    // $ANTLR start "while_stat"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:199:1: while_stat : 'while' exp 'do' block 'end' ;
    public void while_stat() // throws RecognitionException [1]
    {   
        int while_stat_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 12) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:199:12: ( 'while' exp 'do' block 'end' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:199:14: 'while' exp 'do' block 'end'
            {
            	Match(input,37,FOLLOW_37_in_while_stat567); if (state.failed) return ;
            	PushFollow(FOLLOW_exp_in_while_stat569);
            	exp();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	Match(input,26,FOLLOW_26_in_while_stat571); if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEn("While block");
            	}
            	PushFollow(FOLLOW_block_in_while_stat575);
            	block();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEx();
            	}
            	Match(input,27,FOLLOW_27_in_while_stat579); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 12, while_stat_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "while_stat"


    // $ANTLR start "do_block"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:201:1: do_block : 'do' block 'end' ;
    public void do_block() // throws RecognitionException [1]
    {   
        int do_block_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 13) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:201:10: ( 'do' block 'end' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:201:12: 'do' block 'end'
            {
            	Match(input,26,FOLLOW_26_in_do_block587); if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEn("Simple block");
            	}
            	PushFollow(FOLLOW_block_in_do_block591);
            	block();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	  SEx();
            	}
            	Match(input,27,FOLLOW_27_in_do_block595); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 13, do_block_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "do_block"


    // $ANTLR start "varlist1"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:203:1: varlist1 returns [List<Variable> variables] : v1= var ( ',' v2= var )* ;
    public List<Variable> varlist1() // throws RecognitionException [1]
    {   
        List<Variable> variables = default(List<Variable>);
        int varlist1_StartIndex = input.Index();
        Variable v1 = default(Variable);

        Variable v2 = default(Variable);


        variables =  new List<Variable>();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 14) ) 
    	    {
    	    	return variables; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:204:4: (v1= var ( ',' v2= var )* )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:204:6: v1= var ( ',' v2= var )*
            {
            	PushFollow(FOLLOW_var_in_varlist1617);
            	v1 = var();
            	state.followingStackPointer--;
            	if (state.failed) return variables;
            	if ( (state.backtracking==0) )
            	{

            	  					variables.Add(v1);
            	  				
            	}
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:208:4: ( ',' v2= var )*
            	do 
            	{
            	    int alt16 = 2;
            	    int LA16_0 = input.LA(1);

            	    if ( (LA16_0 == 25) )
            	    {
            	        alt16 = 1;
            	    }


            	    switch (alt16) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:208:5: ',' v2= var
            			    {
            			    	Match(input,25,FOLLOW_25_in_varlist1630); if (state.failed) return variables;
            			    	PushFollow(FOLLOW_var_in_varlist1634);
            			    	v2 = var();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return variables;
            			    	if ( (state.backtracking==0) )
            			    	{

            			    	  					variables.Add(v2);
            			    	  				
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop16;
            	    }
            	} while (true);

            	loop16:
            		;	// Stops C# compiler whining that label 'loop16' has no statements


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 14, varlist1_StartIndex); 
            }
        }
        return variables;
    }
    // $ANTLR end "varlist1"


    // $ANTLR start "funcname"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:214:1: funcname returns [Variable variable] : nBase= NAME ( '.' nPath= NAME )* ( ':' nVar= NAME )? ;
    public Variable funcname() // throws RecognitionException [1]
    {   
        Variable variable = default(Variable);
        int funcname_StartIndex = input.Index();
        IToken nBase = null;
        IToken nPath = null;
        IToken nVar = null;


        		Temp.currentVariablesTreeStack.Push(Temp.currentVariableStack);
        		Temp.currentVariableStack = new Stack<Variable>();
        		Temp.currentFunctionSelfValueReference = null;
        		bool pathDefinition = false;
        	
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 15) ) 
    	    {
    	    	return variable; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:222:4: (nBase= NAME ( '.' nPath= NAME )* ( ':' nVar= NAME )? )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:222:6: nBase= NAME ( '.' nPath= NAME )* ( ':' nVar= NAME )?
            {
            	nBase=(IToken)Match(input,NAME,FOLLOW_NAME_in_funcname670); if (state.failed) return variable;
            	if ( (state.backtracking==0) )
            	{

            	  					Variable baseVariable = objectModelProvider.CurrentScope.GetVariable(((nBase != null) ? nBase.Text : null),false,false);
            	  					if(baseVariable != null) Temp.currentVariableStack.Push(baseVariable);
            	  				
            	}
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:227:4: ( '.' nPath= NAME )*
            	do 
            	{
            	    int alt17 = 2;
            	    int LA17_0 = input.LA(1);

            	    if ( (LA17_0 == 38) )
            	    {
            	        alt17 = 1;
            	    }


            	    switch (alt17) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:227:5: '.' nPath= NAME
            			    {
            			    	Match(input,38,FOLLOW_38_in_funcname683); if (state.failed) return variable;
            			    	nPath=(IToken)Match(input,NAME,FOLLOW_NAME_in_funcname687); if (state.failed) return variable;
            			    	if ( (state.backtracking==0) )
            			    	{

            			    	  					if(Temp.currentVariableStack.Count != 0) 
            			    	  					{
            			    	  						Variable baseVariable = Temp.currentVariableStack.Peek();
            			    	  						Variable memberVariable = Helper.GetTableVariable(baseVariable.GetLastRevisionValue(),((nPath != null) ? nPath.Text : null));
            			    	  						if(memberVariable != null) Temp.currentVariableStack.Push(memberVariable);
            			    	  						else Temp.currentVariableStack.Clear();
            			    	  					}
            			    	  				
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop17;
            	    }
            	} while (true);

            	loop17:
            		;	// Stops C# compiler whining that label 'loop17' has no statements

            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:237:7: ( ':' nVar= NAME )?
            	int alt18 = 2;
            	int LA18_0 = input.LA(1);

            	if ( (LA18_0 == 39) )
            	{
            	    alt18 = 1;
            	}
            	switch (alt18) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:237:8: ':' nVar= NAME
            	        {
            	        	Match(input,39,FOLLOW_39_in_funcname702); if (state.failed) return variable;
            	        	nVar=(IToken)Match(input,NAME,FOLLOW_NAME_in_funcname706); if (state.failed) return variable;
            	        	if ( (state.backtracking==0) )
            	        	{

            	        	  					if(Temp.currentVariableStack.Count != 0) 
            	        	  					{
            	        	  						Variable baseVariable = Temp.currentVariableStack.Peek();
            	        	  						Variable memberVariable = Helper.GetTableVariable(baseVariable.GetLastRevisionValue(),((nVar != null) ? nVar.Text : null));
            	        	  						if(memberVariable != null) Temp.currentVariableStack.Push(memberVariable);
            	        	  						else Temp.currentVariableStack.Clear();
            	        	  					}
            	        	  				
            	        	}

            	        }
            	        break;

            	}

            	if ( (state.backtracking==0) )
            	{

            	  		if(Temp.currentVariableStack.Count != 0) 
            	  		{
            	  			if(nVar != null) Temp.currentFunctionSelfHidden = true;
            	  			else if(nPath != null) Temp.currentFunctionSelfHidden = false;
            	  			else Temp.currentFunctionSelfHidden = null;

            	  			variable =  Temp.currentVariableStack.Pop();
            	  			
            	  			if(Temp.currentFunctionSelfHidden.HasValue && Temp.currentVariableStack.Count != 0) 
            	  				Temp.currentFunctionSelfValueReference = Temp.currentVariableStack.Pop().GetLastRevisionValue();
            	  		}
            	  		Temp.currentVariableStack = Temp.currentVariablesTreeStack.Pop();
            	  	
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 15, funcname_StartIndex); 
            }
        }
        return variable;
    }
    // $ANTLR end "funcname"


    // $ANTLR start "namelist"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:263:1: namelist returns [List<Variable> variables] : n1= NAME ( ',' n2= NAME )* ;
    public List<Variable> namelist() // throws RecognitionException [1]
    {   
        List<Variable> variables = default(List<Variable>);
        int namelist_StartIndex = input.Index();
        IToken n1 = null;
        IToken n2 = null;

        variables =  new List<Variable>();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 16) ) 
    	    {
    	    	return variables; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:264:4: (n1= NAME ( ',' n2= NAME )* )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:264:6: n1= NAME ( ',' n2= NAME )*
            {
            	n1=(IToken)Match(input,NAME,FOLLOW_NAME_in_namelist747); if (state.failed) return variables;
            	if ( (state.backtracking==0) )
            	{

            	  					variables.Add(new Variable(){Name=((n1 != null) ? n1.Text : null)});
            	  				
            	}
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:268:4: ( ',' n2= NAME )*
            	do 
            	{
            	    int alt19 = 2;
            	    int LA19_0 = input.LA(1);

            	    if ( (LA19_0 == 25) )
            	    {
            	        int LA19_2 = input.LA(2);

            	        if ( (LA19_2 == NAME) )
            	        {
            	            alt19 = 1;
            	        }


            	    }


            	    switch (alt19) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:268:6: ',' n2= NAME
            			    {
            			    	Match(input,25,FOLLOW_25_in_namelist761); if (state.failed) return variables;
            			    	n2=(IToken)Match(input,NAME,FOLLOW_NAME_in_namelist765); if (state.failed) return variables;
            			    	if ( (state.backtracking==0) )
            			    	{

            			    	  					variables.Add(new Variable(){Name=((n2 != null) ? n2.Text : null)});
            			    	  				
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop19;
            	    }
            	} while (true);

            	loop19:
            		;	// Stops C# compiler whining that label 'loop19' has no statements


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 16, namelist_StartIndex); 
            }
        }
        return variables;
    }
    // $ANTLR end "namelist"


    // $ANTLR start "explist1"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:274:1: explist1 returns [List<ValueReferenceRevision> valueReferenceRevisions] : (e1= exp ',' )* e2= exp ;
    public List<ValueReferenceRevision> explist1() // throws RecognitionException [1]
    {   
        List<ValueReferenceRevision> valueReferenceRevisions = default(List<ValueReferenceRevision>);
        int explist1_StartIndex = input.Index();
        List<ValueReferenceRevision> e1 = default(List<ValueReferenceRevision>);

        List<ValueReferenceRevision> e2 = default(List<ValueReferenceRevision>);



        		valueReferenceRevisions =  new List<ValueReferenceRevision>();
        		List<ValueReferenceRevision> tempReferenceRevisions = null;
        	
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 17) ) 
    	    {
    	    	return valueReferenceRevisions; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:280:4: ( (e1= exp ',' )* e2= exp )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:280:6: (e1= exp ',' )* e2= exp
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:280:6: (e1= exp ',' )*
            	do 
            	{
            	    int alt20 = 2;
            	    alt20 = dfa20.Predict(input);
            	    switch (alt20) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:280:7: e1= exp ','
            			    {
            			    	PushFollow(FOLLOW_exp_in_explist1805);
            			    	e1 = exp();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return valueReferenceRevisions;
            			    	if ( (state.backtracking==0) )
            			    	{

            			    	  					if(tempReferenceRevisions != null)
            			    	  					{
            			    	  						valueReferenceRevisions.Add(tempReferenceRevisions[0]);
            			    	  						tempReferenceRevisions = null;
            			    	  					}
            			    	  					tempReferenceRevisions = e1;
            			    	  				
            			    	}
            			    	Match(input,25,FOLLOW_25_in_explist1819); if (state.failed) return valueReferenceRevisions;

            			    }
            			    break;

            			default:
            			    goto loop20;
            	    }
            	} while (true);

            	loop20:
            		;	// Stops C# compiler whining that label 'loop20' has no statements

            	PushFollow(FOLLOW_exp_in_explist1825);
            	e2 = exp();
            	state.followingStackPointer--;
            	if (state.failed) return valueReferenceRevisions;
            	if ( (state.backtracking==0) )
            	{

            	  			        if(tempReferenceRevisions != null)
            	  					{
            	  						valueReferenceRevisions.Add(tempReferenceRevisions[0]);
            	  						tempReferenceRevisions = null;
            	  					}
            	  			        valueReferenceRevisions.AddRange(e2);
            	  			  	
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 17, explist1_StartIndex); 
            }
        }
        return valueReferenceRevisions;
    }
    // $ANTLR end "explist1"


    // $ANTLR start "exp"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:299:1: exp returns [List<ValueReferenceRevision> valueReferenceRevisions] : ( ( 'nil' | 'false' | 'true' | n= number | st= stringToken | '...' | fu= function | pe= prefixexp | tc= tableconstructor | unop exp ) ( binop exp )* ) ;
    public List<ValueReferenceRevision> exp() // throws RecognitionException [1]
    {   
        List<ValueReferenceRevision> valueReferenceRevisions = default(List<ValueReferenceRevision>);
        int exp_StartIndex = input.Index();
        LuaParser.number_return n = default(LuaParser.number_return);

        LuaParser.stringToken_return st = default(LuaParser.stringToken_return);

        ValueReference fu = default(ValueReference);

        List<ValueReference> pe = default(List<ValueReference>);

        ValueReference tc = default(ValueReference);


         
        		valueReferenceRevisions =  new List<ValueReferenceRevision>();
        		ElementPosition position = this.CurrentElementPosition; 
        		List<ValueReference> valueRefs = new List<ValueReference>(); 
        		IList lst11 = this.GetRuleInvocationStack();
        	
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 18) ) 
    	    {
    	    	return valueReferenceRevisions; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:307:3: ( ( ( 'nil' | 'false' | 'true' | n= number | st= stringToken | '...' | fu= function | pe= prefixexp | tc= tableconstructor | unop exp ) ( binop exp )* ) )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:307:4: ( ( 'nil' | 'false' | 'true' | n= number | st= stringToken | '...' | fu= function | pe= prefixexp | tc= tableconstructor | unop exp ) ( binop exp )* )
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:307:4: ( ( 'nil' | 'false' | 'true' | n= number | st= stringToken | '...' | fu= function | pe= prefixexp | tc= tableconstructor | unop exp ) ( binop exp )* )
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:308:4: ( 'nil' | 'false' | 'true' | n= number | st= stringToken | '...' | fu= function | pe= prefixexp | tc= tableconstructor | unop exp ) ( binop exp )*
            	{
            		// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:308:4: ( 'nil' | 'false' | 'true' | n= number | st= stringToken | '...' | fu= function | pe= prefixexp | tc= tableconstructor | unop exp )
            		int alt21 = 10;
            		switch ( input.LA(1) ) 
            		{
            		case 40:
            			{
            		    alt21 = 1;
            		    }
            		    break;
            		case 41:
            			{
            		    alt21 = 2;
            		    }
            		    break;
            		case 42:
            			{
            		    alt21 = 3;
            		    }
            		    break;
            		case INT:
            		case FLOAT:
            		case EXP:
            		case HEX:
            			{
            		    alt21 = 4;
            		    }
            		    break;
            		case NORMALSTRING:
            		case CHARSTRING:
            		case LONGSTRING:
            			{
            		    alt21 = 5;
            		    }
            		    break;
            		case 43:
            			{
            		    alt21 = 6;
            		    }
            		    break;
            		case 23:
            			{
            		    alt21 = 7;
            		    }
            		    break;
            		case NAME:
            		case 59:
            			{
            		    alt21 = 8;
            		    }
            		    break;
            		case 63:
            			{
            		    alt21 = 9;
            		    }
            		    break;
            		case 45:
            		case 65:
            		case 66:
            			{
            		    alt21 = 10;
            		    }
            		    break;
            			default:
            			    if ( state.backtracking > 0 ) {state.failed = true; return valueReferenceRevisions;}
            			    NoViableAltException nvae_d21s0 =
            			        new NoViableAltException("", 21, 0, input);

            			    throw nvae_d21s0;
            		}

            		switch (alt21) 
            		{
            		    case 1 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:308:6: 'nil'
            		        {
            		        	Match(input,40,FOLLOW_40_in_exp861); if (state.failed) return valueReferenceRevisions;

            		        }
            		        break;
            		    case 2 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:309:6: 'false'
            		        {
            		        	Match(input,41,FOLLOW_41_in_exp872); if (state.failed) return valueReferenceRevisions;
            		        	if ( (state.backtracking==0) )
            		        	{
            		        	   valueRefs.Add(ValueReference.Create(false)); 		
            		        	}

            		        }
            		        break;
            		    case 3 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:310:6: 'true'
            		        {
            		        	Match(input,42,FOLLOW_42_in_exp885); if (state.failed) return valueReferenceRevisions;
            		        	if ( (state.backtracking==0) )
            		        	{
            		        	   valueRefs.Add(ValueReference.Create(true)); 		
            		        	}

            		        }
            		        break;
            		    case 4 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:311:6: n= number
            		        {
            		        	PushFollow(FOLLOW_number_in_exp899);
            		        	n = number();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return valueReferenceRevisions;
            		        	if ( (state.backtracking==0) )
            		        	{
            		        	   valueRefs.Add(ValueReference.Create(((n != null) ? input.ToString((IToken)(n.Start),(IToken)(n.Stop)) : null))); 	
            		        	}

            		        }
            		        break;
            		    case 5 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:312:6: st= stringToken
            		        {
            		        	PushFollow(FOLLOW_stringToken_in_exp913);
            		        	st = stringToken();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return valueReferenceRevisions;
            		        	if ( (state.backtracking==0) )
            		        	{
            		        	   valueRefs.Add(ValueReference.Create(((st != null) ? input.ToString((IToken)(st.Start),(IToken)(st.Stop)) : null))); 	
            		        	}

            		        }
            		        break;
            		    case 6 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:313:6: '...'
            		        {
            		        	Match(input,43,FOLLOW_43_in_exp926); if (state.failed) return valueReferenceRevisions;

            		        }
            		        break;
            		    case 7 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:314:6: fu= function
            		        {
            		        	PushFollow(FOLLOW_function_in_exp936);
            		        	fu = function();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return valueReferenceRevisions;
            		        	if ( (state.backtracking==0) )
            		        	{
            		        	   valueRefs.Add(fu); 
            		        	}

            		        }
            		        break;
            		    case 8 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:315:6: pe= prefixexp
            		        {
            		        	PushFollow(FOLLOW_prefixexp_in_exp950);
            		        	pe = prefixexp();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return valueReferenceRevisions;
            		        	if ( (state.backtracking==0) )
            		        	{
            		        	   valueRefs.AddRange(pe); 
            		        	}

            		        }
            		        break;
            		    case 9 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:316:6: tc= tableconstructor
            		        {
            		        	PushFollow(FOLLOW_tableconstructor_in_exp964);
            		        	tc = tableconstructor();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return valueReferenceRevisions;
            		        	if ( (state.backtracking==0) )
            		        	{
            		        	   valueRefs.Add(tc); 
            		        	}

            		        }
            		        break;
            		    case 10 :
            		        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:317:6: unop exp
            		        {
            		        	PushFollow(FOLLOW_unop_in_exp974);
            		        	unop();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return valueReferenceRevisions;
            		        	PushFollow(FOLLOW_exp_in_exp976);
            		        	exp();
            		        	state.followingStackPointer--;
            		        	if (state.failed) return valueReferenceRevisions;

            		        }
            		        break;

            		}

            		// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:317:19: ( binop exp )*
            		do 
            		{
            		    int alt22 = 2;
            		    int LA22_0 = input.LA(1);

            		    if ( ((LA22_0 >= 44 && LA22_0 <= 58)) )
            		    {
            		        int LA22_2 = input.LA(2);

            		        if ( (synpred37_Lua()) )
            		        {
            		            alt22 = 1;
            		        }


            		    }


            		    switch (alt22) 
            			{
            				case 1 :
            				    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:317:20: binop exp
            				    {
            				    	PushFollow(FOLLOW_binop_in_exp983);
            				    	binop();
            				    	state.followingStackPointer--;
            				    	if (state.failed) return valueReferenceRevisions;
            				    	PushFollow(FOLLOW_exp_in_exp985);
            				    	exp();
            				    	state.followingStackPointer--;
            				    	if (state.failed) return valueReferenceRevisions;

            				    }
            				    break;

            				default:
            				    goto loop22;
            		    }
            		} while (true);

            		loop22:
            			;	// Stops C# compiler whining that label 'loop22' has no statements


            	}

            	if ( (state.backtracking==0) )
            	{

            	  				if(valueRefs.Count == 0) valueRefs.Add(ValueReference.Create());
            	  				foreach(var item in valueRefs) 
            	  				{
            	  					ValueReference resultItem = item;
            	  					if(resultItem == null) resultItem = ValueReference.Create();
            	  					valueReferenceRevisions.Add(new ValueReferenceRevision(position, resultItem));
            	  				}
            	  			
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 18, exp_StartIndex); 
            }
        }
        return valueReferenceRevisions;
    }
    // $ANTLR end "exp"


    // $ANTLR start "binop"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:328:1: binop : ( '+' | '-' | '*' | '/' | '^' | '%' | '..' | '<' | '<=' | '>' | '>=' | '==' | '~=' | 'and' | 'or' );
    public void binop() // throws RecognitionException [1]
    {   
        int binop_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 19) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:328:7: ( '+' | '-' | '*' | '/' | '^' | '%' | '..' | '<' | '<=' | '>' | '>=' | '==' | '~=' | 'and' | 'or' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:
            {
            	if ( (input.LA(1) >= 44 && input.LA(1) <= 58) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 19, binop_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "binop"


    // $ANTLR start "var"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:330:1: var returns [Variable variable] : (n= NAME | '(' exp ')' varSuffix[false] ) (vs= varSuffix[true] )* ;
    public Variable var() // throws RecognitionException [1]
    {   
        Variable variable = default(Variable);
        int var_StartIndex = input.Index();
        IToken n = null;
        Variable vs = default(Variable);



        		Temp.currentVariablesTreeStack.Push(Temp.currentVariableStack);
        		Temp.currentVariableStack = new Stack<Variable>();
        	
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 20) ) 
    	    {
    	    	return variable; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:336:3: ( (n= NAME | '(' exp ')' varSuffix[false] ) (vs= varSuffix[true] )* )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:336:5: (n= NAME | '(' exp ')' varSuffix[false] ) (vs= varSuffix[true] )*
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:336:5: (n= NAME | '(' exp ')' varSuffix[false] )
            	int alt23 = 2;
            	int LA23_0 = input.LA(1);

            	if ( (LA23_0 == NAME) )
            	{
            	    alt23 = 1;
            	}
            	else if ( (LA23_0 == 59) )
            	{
            	    alt23 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return variable;}
            	    NoViableAltException nvae_d23s0 =
            	        new NoViableAltException("", 23, 0, input);

            	    throw nvae_d23s0;
            	}
            	switch (alt23) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:336:7: n= NAME
            	        {
            	        	n=(IToken)Match(input,NAME,FOLLOW_NAME_in_var1084); if (state.failed) return variable;
            	        	if ( (state.backtracking==0) )
            	        	{

            	        	  				Variable result = objectModelProvider.CurrentScope.GetVariable(((n != null) ? n.Text : null),false,false);
            	        	                  if(result != null) Temp.currentVariableStack.Push(result);
            	        	  			
            	        	}

            	        }
            	        break;
            	    case 2 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:341:5: '(' exp ')' varSuffix[false]
            	        {
            	        	Match(input,59,FOLLOW_59_in_var1096); if (state.failed) return variable;
            	        	PushFollow(FOLLOW_exp_in_var1098);
            	        	exp();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return variable;
            	        	Match(input,60,FOLLOW_60_in_var1100); if (state.failed) return variable;
            	        	PushFollow(FOLLOW_varSuffix_in_var1102);
            	        	varSuffix(false);
            	        	state.followingStackPointer--;
            	        	if (state.failed) return variable;

            	        }
            	        break;

            	}

            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:341:36: (vs= varSuffix[true] )*
            	do 
            	{
            	    int alt24 = 2;
            	    alt24 = dfa24.Predict(input);
            	    switch (alt24) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:341:38: vs= varSuffix[true]
            			    {
            			    	PushFollow(FOLLOW_varSuffix_in_var1111);
            			    	vs = varSuffix(true);
            			    	state.followingStackPointer--;
            			    	if (state.failed) return variable;
            			    	if ( (state.backtracking==0) )
            			    	{

            			    	  				if(Temp.currentVariableStack.Count != 0)
            			    	  				{
            			    	  					if(vs != null) Temp.currentVariableStack.Push(vs);
            			    	  					else Temp.currentVariableStack.Clear();
            			    	  				}
            			    	  			
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop24;
            	    }
            	} while (true);

            	loop24:
            		;	// Stops C# compiler whining that label 'loop24' has no statements

            	if ( (state.backtracking==0) )
            	{

            	  				if(Temp.currentVariableStack.Count != 0) variable =  Temp.currentVariableStack.Pop();
            	  				Temp.currentVariableStack = Temp.currentVariablesTreeStack.Pop();
            	  			
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 20, var_StartIndex); 
            }
        }
        return variable;
    }
    // $ANTLR end "var"


    // $ANTLR start "prefixexp"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:355:1: prefixexp returns [List<ValueReference> valueReferences] : voe= varOrExp (naa= nameAndArgs )* ;
    public List<ValueReference> prefixexp() // throws RecognitionException [1]
    {   
        List<ValueReference> valueReferences = default(List<ValueReference>);
        int prefixexp_StartIndex = input.Index();
        ValueReference voe = default(ValueReference);

        List<ValueReference> naa = default(List<ValueReference>);


         
        		valueReferences =  new List<ValueReference>(); 
        		List<ValueReference> tempReferences = null;
        	
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 21) ) 
    	    {
    	    	return valueReferences; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:361:4: (voe= varOrExp (naa= nameAndArgs )* )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:361:6: voe= varOrExp (naa= nameAndArgs )*
            {
            	PushFollow(FOLLOW_varOrExp_in_prefixexp1153);
            	voe = varOrExp();
            	state.followingStackPointer--;
            	if (state.failed) return valueReferences;
            	if ( (state.backtracking==0) )
            	{

            	  					Temp.currentValueReference = voe;
            	  				
            	}
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:365:6: (naa= nameAndArgs )*
            	do 
            	{
            	    int alt25 = 2;
            	    alt25 = dfa25.Predict(input);
            	    switch (alt25) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:365:7: naa= nameAndArgs
            			    {
            			    	PushFollow(FOLLOW_nameAndArgs_in_prefixexp1170);
            			    	naa = nameAndArgs();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return valueReferences;
            			    	if ( (state.backtracking==0) )
            			    	{

            			    	  					tempReferences = naa;
            			    	  					if(tempReferences.Count == 0) Temp.currentValueReference = ValueReference.Create();
            			    	  					else Temp.currentValueReference = tempReferences[0];
            			    	  				
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop25;
            	    }
            	} while (true);

            	loop25:
            		;	// Stops C# compiler whining that label 'loop25' has no statements

            	if ( (state.backtracking==0) )
            	{

            	  					if(tempReferences != null) valueReferences.AddRange(tempReferences);
            	  					else valueReferences.Add(voe);
            	  					Temp.currentValueReference = null;
            	  				
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 21, prefixexp_StartIndex); 
            }
        }
        return valueReferences;
    }
    // $ANTLR end "prefixexp"


    // $ANTLR start "functioncall"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:378:1: functioncall : varOrExp ( nameAndArgs )+ ;
    public void functioncall() // throws RecognitionException [1]
    {   
        int functioncall_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 22) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:378:13: ( varOrExp ( nameAndArgs )+ )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:378:15: varOrExp ( nameAndArgs )+
            {
            	PushFollow(FOLLOW_varOrExp_in_functioncall1198);
            	varOrExp();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:378:24: ( nameAndArgs )+
            	int cnt26 = 0;
            	do 
            	{
            	    int alt26 = 2;
            	    alt26 = dfa26.Predict(input);
            	    switch (alt26) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:0:0: nameAndArgs
            			    {
            			    	PushFollow(FOLLOW_nameAndArgs_in_functioncall1200);
            			    	nameAndArgs();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return ;

            			    }
            			    break;

            			default:
            			    if ( cnt26 >= 1 ) goto loop26;
            			    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            		            EarlyExitException eee26 =
            		                new EarlyExitException(26, input);
            		            throw eee26;
            	    }
            	    cnt26++;
            	} while (true);

            	loop26:
            		;	// Stops C# compiler whining that label 'loop26' has no statements


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 22, functioncall_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "functioncall"


    // $ANTLR start "varOrExp"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:380:1: varOrExp returns [ValueReference valueReference] : (v= var | '(' ex= exp ')' );
    public ValueReference varOrExp() // throws RecognitionException [1]
    {   
        ValueReference valueReference = default(ValueReference);
        int varOrExp_StartIndex = input.Index();
        Variable v = default(Variable);

        List<ValueReferenceRevision> ex = default(List<ValueReferenceRevision>);


        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 23) ) 
    	    {
    	    	return valueReference; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:381:4: (v= var | '(' ex= exp ')' )
            int alt27 = 2;
            int LA27_0 = input.LA(1);

            if ( (LA27_0 == NAME) )
            {
                alt27 = 1;
            }
            else if ( (LA27_0 == 59) )
            {
                int LA27_2 = input.LA(2);

                if ( (synpred56_Lua()) )
                {
                    alt27 = 1;
                }
                else if ( (true) )
                {
                    alt27 = 2;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return valueReference;}
                    NoViableAltException nvae_d27s2 =
                        new NoViableAltException("", 27, 2, input);

                    throw nvae_d27s2;
                }
            }
            else 
            {
                if ( state.backtracking > 0 ) {state.failed = true; return valueReference;}
                NoViableAltException nvae_d27s0 =
                    new NoViableAltException("", 27, 0, input);

                throw nvae_d27s0;
            }
            switch (alt27) 
            {
                case 1 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:381:6: v= var
                    {
                    	PushFollow(FOLLOW_var_in_varOrExp1217);
                    	v = var();
                    	state.followingStackPointer--;
                    	if (state.failed) return valueReference;
                    	if ( (state.backtracking==0) )
                    	{
                    	   
                    	  					if(v != null) 
                    	  						valueReference =  v.GetLastRevisionValue(); 
                    	  				
                    	}

                    }
                    break;
                case 2 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:386:6: '(' ex= exp ')'
                    {
                    	Match(input,59,FOLLOW_59_in_varOrExp1232); if (state.failed) return valueReference;
                    	PushFollow(FOLLOW_exp_in_varOrExp1236);
                    	ex = exp();
                    	state.followingStackPointer--;
                    	if (state.failed) return valueReference;
                    	Match(input,60,FOLLOW_60_in_varOrExp1238); if (state.failed) return valueReference;
                    	if ( (state.backtracking==0) )
                    	{

                    	  					valueReference =  ex[0].ValueReference;
                    	  				
                    	}

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 23, varOrExp_StartIndex); 
            }
        }
        return valueReference;
    }
    // $ANTLR end "varOrExp"


    // $ANTLR start "nameAndArgs"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:391:1: nameAndArgs returns [List<ValueReference> valueReferences] : ( ':' n= NAME )? args ;
    public List<ValueReference> nameAndArgs() // throws RecognitionException [1]
    {   
        List<ValueReference> valueReferences = default(List<ValueReference>);
        int nameAndArgs_StartIndex = input.Index();
        IToken n = null;

        valueReferences =  new List<ValueReference>();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 24) ) 
    	    {
    	    	return valueReferences; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:392:4: ( ( ':' n= NAME )? args )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:392:6: ( ':' n= NAME )? args
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:392:6: ( ':' n= NAME )?
            	int alt28 = 2;
            	int LA28_0 = input.LA(1);

            	if ( (LA28_0 == 39) )
            	{
            	    alt28 = 1;
            	}
            	switch (alt28) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:392:7: ':' n= NAME
            	        {
            	        	Match(input,39,FOLLOW_39_in_nameAndArgs1265); if (state.failed) return valueReferences;
            	        	n=(IToken)Match(input,NAME,FOLLOW_NAME_in_nameAndArgs1269); if (state.failed) return valueReferences;

            	        }
            	        break;

            	}

            	PushFollow(FOLLOW_args_in_nameAndArgs1274);
            	args();
            	state.followingStackPointer--;
            	if (state.failed) return valueReferences;
            	if ( (state.backtracking==0) )
            	{

            	  					if(Temp.currentValueReference != null)
            	  					{
            	  						Function functionValue = null;
            	  						if(string.IsNullOrEmpty(((n != null) ? n.Text : null)))
            	  						{
            	  							functionValue = Temp.currentValueReference.Value as Function;
            	  						}
            	  						else
            	  						{
            	  							Metatable table = Temp.currentValueReference.Value as Metatable;
            	  							if(table != null && table.Contains(((n != null) ? n.Text : null)))
            	  							{
            	  								functionValue = table[((n != null) ? n.Text : null)].GetLastRevisionValue().Value as Function;
            	  							}
            	  						}
            	  						if(functionValue != null)
            	  						{
            	  							valueReferences.AddRange(functionValue.Returns);
            	  						}
            	  					}
            	  				
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 24, nameAndArgs_StartIndex); 
            }
        }
        return valueReferences;
    }
    // $ANTLR end "nameAndArgs"


    // $ANTLR start "varSuffix"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:416:1: varSuffix[bool recognizeVariable] returns [Variable variable] : ( nameAndArgs )* ( '[' ex= exp ']' | ( '.' n= NAME ) ) ;
    public Variable varSuffix(bool recognizeVariable) // throws RecognitionException [1]
    {   
        Variable variable = default(Variable);
        int varSuffix_StartIndex = input.Index();
        IToken n = null;
        List<ValueReferenceRevision> ex = default(List<ValueReferenceRevision>);


         variable =  null; 
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 25) ) 
    	    {
    	    	return variable; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:417:3: ( ( nameAndArgs )* ( '[' ex= exp ']' | ( '.' n= NAME ) ) )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:417:5: ( nameAndArgs )* ( '[' ex= exp ']' | ( '.' n= NAME ) )
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:417:5: ( nameAndArgs )*
            	do 
            	{
            	    int alt29 = 2;
            	    int LA29_0 = input.LA(1);

            	    if ( ((LA29_0 >= NORMALSTRING && LA29_0 <= LONGSTRING) || LA29_0 == 39 || LA29_0 == 59 || LA29_0 == 63) )
            	    {
            	        alt29 = 1;
            	    }


            	    switch (alt29) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:417:6: nameAndArgs
            			    {
            			    	PushFollow(FOLLOW_nameAndArgs_in_varSuffix1302);
            			    	nameAndArgs();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return variable;
            			    	if ( (state.backtracking==0) )
            			    	{
            			    	  recognizeVariable =  false;
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop29;
            	    }
            	} while (true);

            	loop29:
            		;	// Stops C# compiler whining that label 'loop29' has no statements

            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:417:51: ( '[' ex= exp ']' | ( '.' n= NAME ) )
            	int alt30 = 2;
            	int LA30_0 = input.LA(1);

            	if ( (LA30_0 == 61) )
            	{
            	    alt30 = 1;
            	}
            	else if ( (LA30_0 == 38) )
            	{
            	    alt30 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return variable;}
            	    NoViableAltException nvae_d30s0 =
            	        new NoViableAltException("", 30, 0, input);

            	    throw nvae_d30s0;
            	}
            	switch (alt30) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:417:53: '[' ex= exp ']'
            	        {
            	        	Match(input,61,FOLLOW_61_in_varSuffix1311); if (state.failed) return variable;
            	        	PushFollow(FOLLOW_exp_in_varSuffix1315);
            	        	ex = exp();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return variable;
            	        	Match(input,62,FOLLOW_62_in_varSuffix1317); if (state.failed) return variable;
            	        	if ( (state.backtracking==0) )
            	        	{

            	        	  				if(recognizeVariable && ex.Count > 0)
            	        	  				{
            	        	  					ValueReferenceRevision exRevision = ex[0];
            	        	                      Temp.currentVariableKey = exRevision.ValueReference.Value as string;
            	        	  					if(exRevision.ValueReference.Type == ValueReferenceType.String) 
            	        	  					{
            	        	  						Temp.currentVariableKey = exRevision.ValueReference.Value as string;
            	        	  					}
            	        	  					else if(exRevision.ValueReference.Value is int) 
            	        	  					{
            	        	  						Temp.currentVariableKey = Metatable.ConvertKey((int)exRevision.ValueReference.Value);
            	        	  					}
            	        	  					else Temp.currentVariableKey = null;
            	        	  				}
            	        	  			
            	        	}

            	        }
            	        break;
            	    case 2 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:434:5: ( '.' n= NAME )
            	        {
            	        	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:434:5: ( '.' n= NAME )
            	        	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:434:6: '.' n= NAME
            	        	{
            	        		Match(input,38,FOLLOW_38_in_varSuffix1330); if (state.failed) return variable;
            	        		n=(IToken)Match(input,NAME,FOLLOW_NAME_in_varSuffix1334); if (state.failed) return variable;
            	        		if ( (state.backtracking==0) )
            	        		{

            	        		  				if(recognizeVariable) Temp.currentVariableKey = ((n != null) ? n.Text : null);
            	        		  				else Temp.currentVariableKey = null;
            	        		  			
            	        		}

            	        	}


            	        }
            	        break;

            	}

            	if ( (state.backtracking==0) )
            	{

            	  				if(recognizeVariable && Temp.currentVariableStack.Count != 0)
            	  				{
            	  					ValueReference baseValueReference = Temp.currentVariableStack.Peek().GetLastRevisionValue();
            	                      
            	  					if(baseValueReference.Type == ValueReferenceType.Table && !string.IsNullOrEmpty(Temp.currentVariableKey))
            	  					{
            	  						Metatable metatable = baseValueReference.Value as Metatable;
            	  						if(!metatable.Contains(Temp.currentVariableKey)) metatable[Temp.currentVariableKey] = new Variable(){ Name=Temp.currentVariableKey };
            	  						variable =  metatable[Temp.currentVariableKey];
            	  					}	
            	  				}
            	  			
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 25, varSuffix_StartIndex); 
            }
        }
        return variable;
    }
    // $ANTLR end "varSuffix"


    // $ANTLR start "args"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:454:1: args : ( '(' ( explist1 )? ')' | tableconstructor | stringToken );
    public void args() // throws RecognitionException [1]
    {   
        int args_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 26) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:454:6: ( '(' ( explist1 )? ')' | tableconstructor | stringToken )
            int alt32 = 3;
            switch ( input.LA(1) ) 
            {
            case 59:
            	{
                alt32 = 1;
                }
                break;
            case 63:
            	{
                alt32 = 2;
                }
                break;
            case NORMALSTRING:
            case CHARSTRING:
            case LONGSTRING:
            	{
                alt32 = 3;
                }
                break;
            	default:
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    NoViableAltException nvae_d32s0 =
            	        new NoViableAltException("", 32, 0, input);

            	    throw nvae_d32s0;
            }

            switch (alt32) 
            {
                case 1 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:454:9: '(' ( explist1 )? ')'
                    {
                    	Match(input,59,FOLLOW_59_in_args1360); if (state.failed) return ;
                    	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:454:13: ( explist1 )?
                    	int alt31 = 2;
                    	int LA31_0 = input.LA(1);

                    	if ( ((LA31_0 >= NAME && LA31_0 <= LONGSTRING) || LA31_0 == 23 || (LA31_0 >= 40 && LA31_0 <= 43) || LA31_0 == 45 || LA31_0 == 59 || LA31_0 == 63 || (LA31_0 >= 65 && LA31_0 <= 66)) )
                    	{
                    	    alt31 = 1;
                    	}
                    	switch (alt31) 
                    	{
                    	    case 1 :
                    	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:454:14: explist1
                    	        {
                    	        	PushFollow(FOLLOW_explist1_in_args1363);
                    	        	explist1();
                    	        	state.followingStackPointer--;
                    	        	if (state.failed) return ;

                    	        }
                    	        break;

                    	}

                    	Match(input,60,FOLLOW_60_in_args1367); if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:454:31: tableconstructor
                    {
                    	PushFollow(FOLLOW_tableconstructor_in_args1371);
                    	tableconstructor();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 3 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:454:50: stringToken
                    {
                    	PushFollow(FOLLOW_stringToken_in_args1375);
                    	stringToken();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 26, args_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "args"


    // $ANTLR start "function"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:456:1: function returns [ValueReference valueReference] : 'function' fb= func_body ;
    public ValueReference function() // throws RecognitionException [1]
    {   
        ValueReference valueReference = default(ValueReference);
        int function_StartIndex = input.Index();
        ValueReference fb = default(ValueReference);


        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 27) ) 
    	    {
    	    	return valueReference; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:456:48: ( 'function' fb= func_body )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:456:50: 'function' fb= func_body
            {
            	if ( (state.backtracking==0) )
            	{
            	  SEn("Function definition block"); 
            	}
            	Match(input,23,FOLLOW_23_in_function1388); if (state.failed) return valueReference;
            	PushFollow(FOLLOW_func_body_in_function1392);
            	fb = func_body();
            	state.followingStackPointer--;
            	if (state.failed) return valueReference;
            	if ( (state.backtracking==0) )
            	{
            	  valueReference =  fb; SEx(); 
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 27, function_StartIndex); 
            }
        }
        return valueReference;
    }
    // $ANTLR end "function"


    // $ANTLR start "func_body"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:458:1: func_body returns [ValueReference valueReference] : '(' (fpl= func_parlist )? ')' block 'end' ;
    public ValueReference func_body() // throws RecognitionException [1]
    {   
        ValueReference valueReference = default(ValueReference);
        int func_body_StartIndex = input.Index();
        List<FunctionArgument> fpl = default(List<FunctionArgument>);


         Function func = new Function(); 
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 28) ) 
    	    {
    	    	return valueReference; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:459:4: ( '(' (fpl= func_parlist )? ')' block 'end' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:459:6: '(' (fpl= func_parlist )? ')' block 'end'
            {
            	Match(input,59,FOLLOW_59_in_func_body1412); if (state.failed) return valueReference;
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:459:10: (fpl= func_parlist )?
            	int alt33 = 2;
            	int LA33_0 = input.LA(1);

            	if ( (LA33_0 == NAME || LA33_0 == 43) )
            	{
            	    alt33 = 1;
            	}
            	switch (alt33) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:459:11: fpl= func_parlist
            	        {
            	        	PushFollow(FOLLOW_func_parlist_in_func_body1417);
            	        	fpl = func_parlist();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return valueReference;

            	        }
            	        break;

            	}

            	Match(input,60,FOLLOW_60_in_func_body1422); if (state.failed) return valueReference;
            	PushFollow(FOLLOW_block_in_func_body1424);
            	block();
            	state.followingStackPointer--;
            	if (state.failed) return valueReference;
            	Match(input,27,FOLLOW_27_in_func_body1426); if (state.failed) return valueReference;
            	if ( (state.backtracking==0) )
            	{

            	  					if(fpl != null)
            	  					{
            	  						func.Arguments.AddRange(fpl);
            	  					}
            	  					
            	  					valueReference =  ValueReference.Create(func);
            	  				
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 28, func_body_StartIndex); 
            }
        }
        return valueReference;
    }
    // $ANTLR end "func_body"


    // $ANTLR start "func_parlist"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:469:1: func_parlist returns [List<FunctionArgument> arguments] : (nl= namelist ( ',' '...' )? | '...' ) ;
    public List<FunctionArgument> func_parlist() // throws RecognitionException [1]
    {   
        List<FunctionArgument> arguments = default(List<FunctionArgument>);
        int func_parlist_StartIndex = input.Index();
        List<Variable> nl = default(List<Variable>);


        arguments =  new List<FunctionArgument>();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 29) ) 
    	    {
    	    	return arguments; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:470:5: ( (nl= namelist ( ',' '...' )? | '...' ) )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:470:6: (nl= namelist ( ',' '...' )? | '...' )
            {
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:470:6: (nl= namelist ( ',' '...' )? | '...' )
            	int alt35 = 2;
            	int LA35_0 = input.LA(1);

            	if ( (LA35_0 == NAME) )
            	{
            	    alt35 = 1;
            	}
            	else if ( (LA35_0 == 43) )
            	{
            	    alt35 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return arguments;}
            	    NoViableAltException nvae_d35s0 =
            	        new NoViableAltException("", 35, 0, input);

            	    throw nvae_d35s0;
            	}
            	switch (alt35) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:470:7: nl= namelist ( ',' '...' )?
            	        {
            	        	PushFollow(FOLLOW_namelist_in_func_parlist1453);
            	        	nl = namelist();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return arguments;
            	        	if ( (state.backtracking==0) )
            	        	{

            	        	  						if(nl != null)
            	        	  						{
            	        	  							foreach(var item in nl)
            	        	  							{
            	        	  								if(Temp.currentFunctionSelfHidden.HasValue)
            	        	  								{
            	        	  									if(Temp.currentFunctionSelfHidden.Value)
            	        	  									{
            	        	  										Variable selfVar = new Variable();
            	        	  										selfVar.Name = "self";
            	        	  										selfVar.SetValue(this.CurrentElementPosition, Temp.currentFunctionSelfValueReference);
            	        	  										
            	        	  										objectModelProvider.CurrentScope.AddVariable(selfVar);
            	        	  									}
            	        	  									else
            	        	  									{
            	        	  										item.SetValue(this.CurrentElementPosition, Temp.currentFunctionSelfValueReference);
            	        	  									}
            	        	  									
            	        	  									Temp.currentFunctionSelfHidden = null;
            	        	  								}
            	        	  								objectModelProvider.CurrentScope.AddVariable(item);
            	        	  								arguments.Add(new FunctionArgument(item.Name));
            	        	  							}
            	        	  						}
            	        	  					
            	        	}
            	        	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:498:5: ( ',' '...' )?
            	        	int alt34 = 2;
            	        	int LA34_0 = input.LA(1);

            	        	if ( (LA34_0 == 25) )
            	        	{
            	        	    alt34 = 1;
            	        	}
            	        	switch (alt34) 
            	        	{
            	        	    case 1 :
            	        	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:498:6: ',' '...'
            	        	        {
            	        	        	Match(input,25,FOLLOW_25_in_func_parlist1468); if (state.failed) return arguments;
            	        	        	Match(input,43,FOLLOW_43_in_func_parlist1470); if (state.failed) return arguments;
            	        	        	if ( (state.backtracking==0) )
            	        	        	{
            	        	        	   arguments.Add(new FunctionArgument("...")); 
            	        	        	}

            	        	        }
            	        	        break;

            	        	}


            	        }
            	        break;
            	    case 2 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:498:69: '...'
            	        {
            	        	Match(input,43,FOLLOW_43_in_func_parlist1478); if (state.failed) return arguments;
            	        	if ( (state.backtracking==0) )
            	        	{
            	        	   arguments.Add(new FunctionArgument("...")); 
            	        	}

            	        }
            	        break;

            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 29, func_parlist_StartIndex); 
            }
        }
        return arguments;
    }
    // $ANTLR end "func_parlist"


    // $ANTLR start "tableconstructor"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:500:1: tableconstructor returns [ValueReference valueReference] : '{' (fl= fieldlist )? '}' ;
    public ValueReference tableconstructor() // throws RecognitionException [1]
    {   
        ValueReference valueReference = default(ValueReference);
        int tableconstructor_StartIndex = input.Index();
        List<Variable> fl = default(List<Variable>);


         Metatable metatable = new Metatable();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 30) ) 
    	    {
    	    	return valueReference; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:501:4: ( '{' (fl= fieldlist )? '}' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:501:6: '{' (fl= fieldlist )? '}'
            {
            	Match(input,63,FOLLOW_63_in_tableconstructor1501); if (state.failed) return valueReference;
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:501:10: (fl= fieldlist )?
            	int alt36 = 2;
            	int LA36_0 = input.LA(1);

            	if ( ((LA36_0 >= NAME && LA36_0 <= LONGSTRING) || LA36_0 == 23 || (LA36_0 >= 40 && LA36_0 <= 43) || LA36_0 == 45 || LA36_0 == 59 || LA36_0 == 61 || LA36_0 == 63 || (LA36_0 >= 65 && LA36_0 <= 66)) )
            	{
            	    alt36 = 1;
            	}
            	switch (alt36) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:501:11: fl= fieldlist
            	        {
            	        	PushFollow(FOLLOW_fieldlist_in_tableconstructor1506);
            	        	fl = fieldlist();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return valueReference;

            	        }
            	        break;

            	}

            	Match(input,64,FOLLOW_64_in_tableconstructor1510); if (state.failed) return valueReference;
            	if ( (state.backtracking==0) )
            	{

            	  					if(fl != null) metatable.AddRange(fl);
            	  					valueReference =  ValueReference.Create(metatable);
            	  				
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 30, tableconstructor_StartIndex); 
            }
        }
        return valueReference;
    }
    // $ANTLR end "tableconstructor"


    // $ANTLR start "fieldlist"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:508:1: fieldlist returns [List<Variable> variables] : f1= field ( fieldsep f2= field )* ( fieldsep )? ;
    public List<Variable> fieldlist() // throws RecognitionException [1]
    {   
        List<Variable> variables = default(List<Variable>);
        int fieldlist_StartIndex = input.Index();
        List<Variable> f1 = default(List<Variable>);

        List<Variable> f2 = default(List<Variable>);


        variables =  new List<Variable>();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 31) ) 
    	    {
    	    	return variables; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:509:4: (f1= field ( fieldsep f2= field )* ( fieldsep )? )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:509:6: f1= field ( fieldsep f2= field )* ( fieldsep )?
            {
            	PushFollow(FOLLOW_field_in_fieldlist1541);
            	f1 = field();
            	state.followingStackPointer--;
            	if (state.failed) return variables;
            	if ( (state.backtracking==0) )
            	{

            	  					variables.AddRange(f1);
            	  				
            	}
            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:513:4: ( fieldsep f2= field )*
            	do 
            	{
            	    int alt37 = 2;
            	    int LA37_0 = input.LA(1);

            	    if ( (LA37_0 == 20 || LA37_0 == 25) )
            	    {
            	        int LA37_1 = input.LA(2);

            	        if ( ((LA37_1 >= NAME && LA37_1 <= LONGSTRING) || LA37_1 == 23 || (LA37_1 >= 40 && LA37_1 <= 43) || LA37_1 == 45 || LA37_1 == 59 || LA37_1 == 61 || LA37_1 == 63 || (LA37_1 >= 65 && LA37_1 <= 66)) )
            	        {
            	            alt37 = 1;
            	        }


            	    }


            	    switch (alt37) 
            		{
            			case 1 :
            			    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:513:5: fieldsep f2= field
            			    {
            			    	PushFollow(FOLLOW_fieldsep_in_fieldlist1554);
            			    	fieldsep();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return variables;
            			    	PushFollow(FOLLOW_field_in_fieldlist1558);
            			    	f2 = field();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return variables;
            			    	if ( (state.backtracking==0) )
            			    	{

            			    	  					variables.AddRange(f2);
            			    	  				
            			    	}

            			    }
            			    break;

            			default:
            			    goto loop37;
            	    }
            	} while (true);

            	loop37:
            		;	// Stops C# compiler whining that label 'loop37' has no statements

            	// X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:517:7: ( fieldsep )?
            	int alt38 = 2;
            	int LA38_0 = input.LA(1);

            	if ( (LA38_0 == 20 || LA38_0 == 25) )
            	{
            	    alt38 = 1;
            	}
            	switch (alt38) 
            	{
            	    case 1 :
            	        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:517:8: fieldsep
            	        {
            	        	PushFollow(FOLLOW_fieldsep_in_fieldlist1573);
            	        	fieldsep();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return variables;

            	        }
            	        break;

            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 31, fieldlist_StartIndex); 
            }
        }
        return variables;
    }
    // $ANTLR end "fieldlist"


    // $ANTLR start "field"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:519:1: field returns [List<Variable> variables] : ( '[' ex1= exp ']' '=' ex2= exp | n= NAME '=' ex3= exp | ex4= exp );
    public List<Variable> field() // throws RecognitionException [1]
    {   
        List<Variable> variables = default(List<Variable>);
        int field_StartIndex = input.Index();
        IToken n = null;
        List<ValueReferenceRevision> ex1 = default(List<ValueReferenceRevision>);

        List<ValueReferenceRevision> ex2 = default(List<ValueReferenceRevision>);

        List<ValueReferenceRevision> ex3 = default(List<ValueReferenceRevision>);

        List<ValueReferenceRevision> ex4 = default(List<ValueReferenceRevision>);



        		variables =  new List<Variable>();
        	
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 32) ) 
    	    {
    	    	return variables; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:524:4: ( '[' ex1= exp ']' '=' ex2= exp | n= NAME '=' ex3= exp | ex4= exp )
            int alt39 = 3;
            switch ( input.LA(1) ) 
            {
            case 61:
            	{
                alt39 = 1;
                }
                break;
            case NAME:
            	{
                int LA39_2 = input.LA(2);

                if ( (LA39_2 == 22) )
                {
                    alt39 = 2;
                }
                else if ( (LA39_2 == EOF || (LA39_2 >= NORMALSTRING && LA39_2 <= LONGSTRING) || LA39_2 == 20 || LA39_2 == 25 || (LA39_2 >= 38 && LA39_2 <= 39) || (LA39_2 >= 44 && LA39_2 <= 59) || LA39_2 == 61 || (LA39_2 >= 63 && LA39_2 <= 64)) )
                {
                    alt39 = 3;
                }
                else 
                {
                    if ( state.backtracking > 0 ) {state.failed = true; return variables;}
                    NoViableAltException nvae_d39s2 =
                        new NoViableAltException("", 39, 2, input);

                    throw nvae_d39s2;
                }
                }
                break;
            case INT:
            case FLOAT:
            case EXP:
            case HEX:
            case NORMALSTRING:
            case CHARSTRING:
            case LONGSTRING:
            case 23:
            case 40:
            case 41:
            case 42:
            case 43:
            case 45:
            case 59:
            case 63:
            case 65:
            case 66:
            	{
                alt39 = 3;
                }
                break;
            	default:
            	    if ( state.backtracking > 0 ) {state.failed = true; return variables;}
            	    NoViableAltException nvae_d39s0 =
            	        new NoViableAltException("", 39, 0, input);

            	    throw nvae_d39s0;
            }

            switch (alt39) 
            {
                case 1 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:524:6: '[' ex1= exp ']' '=' ex2= exp
                    {
                    	Match(input,61,FOLLOW_61_in_field1596); if (state.failed) return variables;
                    	PushFollow(FOLLOW_exp_in_field1600);
                    	ex1 = exp();
                    	state.followingStackPointer--;
                    	if (state.failed) return variables;
                    	Match(input,62,FOLLOW_62_in_field1602); if (state.failed) return variables;
                    	Match(input,22,FOLLOW_22_in_field1604); if (state.failed) return variables;
                    	PushFollow(FOLLOW_exp_in_field1608);
                    	ex2 = exp();
                    	state.followingStackPointer--;
                    	if (state.failed) return variables;
                    	if ( (state.backtracking==0) )
                    	{

                    	  					ValueReferenceRevision exRevision = ex1[0];
                    	  					if(exRevision.ValueReference.Type == ValueReferenceType.String) 
                    	  					{
                    	  						Variable variable = new Variable();
                    	  						variable.Name = exRevision.ValueReference.Value as string;
                    	  						variable.SetValue(ex2[0]);
                    	  						
                    	  						variables.Add(variable);
                    	  					}
                    	  				
                    	}

                    }
                    break;
                case 2 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:536:6: n= NAME '=' ex3= exp
                    {
                    	n=(IToken)Match(input,NAME,FOLLOW_NAME_in_field1624); if (state.failed) return variables;
                    	Match(input,22,FOLLOW_22_in_field1626); if (state.failed) return variables;
                    	PushFollow(FOLLOW_exp_in_field1630);
                    	ex3 = exp();
                    	state.followingStackPointer--;
                    	if (state.failed) return variables;
                    	if ( (state.backtracking==0) )
                    	{

                    	  					Variable variable = new Variable();
                    	  					variable.Name = ((n != null) ? n.Text : null);
                    	  					variable.SetValue(ex3[0]);
                    	  					
                    	  					variables.Add(variable);
                    	  				
                    	}

                    }
                    break;
                case 3 :
                    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:544:6: ex4= exp
                    {
                    	PushFollow(FOLLOW_exp_in_field1646);
                    	ex4 = exp();
                    	state.followingStackPointer--;
                    	if (state.failed) return variables;
                    	if ( (state.backtracking==0) )
                    	{

                    	  					foreach(var item in ex4)
                    	  					{
                    	  						Variable variable = new Variable();
                    	  						variable.Name = Variable.UnknownIndexName;
                    	  						variable.SetValue(item);
                    	  						
                    	  						variables.Add(variable);
                    	  					}
                    	  				
                    	}

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 32, field_StartIndex); 
            }
        }
        return variables;
    }
    // $ANTLR end "field"


    // $ANTLR start "fieldsep"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:556:1: fieldsep : ( ',' | ';' );
    public void fieldsep() // throws RecognitionException [1]
    {   
        int fieldsep_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 33) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:556:10: ( ',' | ';' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:
            {
            	if ( input.LA(1) == 20 || input.LA(1) == 25 ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 33, fieldsep_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "fieldsep"


    // $ANTLR start "unop"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:558:1: unop : ( '-' | 'not' | '#' );
    public void unop() // throws RecognitionException [1]
    {   
        int unop_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 34) ) 
    	    {
    	    	return ; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:558:6: ( '-' | 'not' | '#' )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:
            {
            	if ( input.LA(1) == 45 || (input.LA(1) >= 65 && input.LA(1) <= 66) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 34, unop_StartIndex); 
            }
        }
        return ;
    }
    // $ANTLR end "unop"

    public class number_return : ParserRuleReturnScope
    {
    };

    // $ANTLR start "number"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:560:1: number : ( INT | FLOAT | EXP | HEX );
    public LuaParser.number_return number() // throws RecognitionException [1]
    {   
        LuaParser.number_return retval = new LuaParser.number_return();
        retval.Start = input.LT(1);
        int number_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 35) ) 
    	    {
    	    	return retval; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:560:8: ( INT | FLOAT | EXP | HEX )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:
            {
            	if ( (input.LA(1) >= INT && input.LA(1) <= HEX) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 35, number_StartIndex); 
            }
        }
        return retval;
    }
    // $ANTLR end "number"

    public class stringToken_return : ParserRuleReturnScope
    {
    };

    // $ANTLR start "stringToken"
    // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:562:1: stringToken : ( NORMALSTRING | CHARSTRING | LONGSTRING );
    public LuaParser.stringToken_return stringToken() // throws RecognitionException [1]
    {   
        LuaParser.stringToken_return retval = new LuaParser.stringToken_return();
        retval.Start = input.LT(1);
        int stringToken_StartIndex = input.Index();
        try 
    	{
    	    if ( (state.backtracking > 0) && AlreadyParsedRule(input, 36) ) 
    	    {
    	    	return retval; 
    	    }
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:562:13: ( NORMALSTRING | CHARSTRING | LONGSTRING )
            // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:
            {
            	if ( (input.LA(1) >= NORMALSTRING && input.LA(1) <= LONGSTRING) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return retval;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

            retval.Stop = input.LT(-1);

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
            if ( state.backtracking > 0 ) 
            {
            	Memoize(input, 36, stringToken_StartIndex); 
            }
        }
        return retval;
    }
    // $ANTLR end "stringToken"

    // $ANTLR start "synpred1_Lua"
    public void synpred1_Lua_fragment() {
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:114:12: ( chunk )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:114:12: chunk
        {
        	if ( (state.backtracking==0) )
        	{
        	  SEn("Global block");
        	}
        	PushFollow(FOLLOW_chunk_in_synpred1_Lua120);
        	chunk();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred1_Lua"

    // $ANTLR start "synpred6_Lua"
    public void synpred6_Lua_fragment() {
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:11: ( chunk )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:117:11: chunk
        {
        	PushFollow(FOLLOW_chunk_in_synpred6_Lua163);
        	chunk();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred6_Lua"

    // $ANTLR start "synpred7_Lua"
    public void synpred7_Lua_fragment() {
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:119:9: ( var_assignment )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:119:9: var_assignment
        {
        	PushFollow(FOLLOW_var_assignment_in_synpred7_Lua176);
        	var_assignment();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred7_Lua"

    // $ANTLR start "synpred8_Lua"
    public void synpred8_Lua_fragment() {
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:120:5: ( functioncall )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:120:5: functioncall
        {
        	PushFollow(FOLLOW_functioncall_in_synpred8_Lua182);
        	functioncall();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred8_Lua"

    // $ANTLR start "synpred14_Lua"
    public void synpred14_Lua_fragment() {
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:126:5: ( func_definition )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:126:5: func_definition
        {
        	PushFollow(FOLLOW_func_definition_in_synpred14_Lua219);
        	func_definition();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred14_Lua"

    // $ANTLR start "synpred27_Lua"
    public void synpred27_Lua_fragment() {
        List<ValueReferenceRevision> e1 = default(List<ValueReferenceRevision>);


        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:280:7: (e1= exp ',' )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:280:7: e1= exp ','
        {
        	PushFollow(FOLLOW_exp_in_synpred27_Lua805);
        	e1 = exp();
        	state.followingStackPointer--;
        	if (state.failed) return ;
        	Match(input,25,FOLLOW_25_in_synpred27_Lua819); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred27_Lua"

    // $ANTLR start "synpred37_Lua"
    public void synpred37_Lua_fragment() {
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:317:20: ( binop exp )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:317:20: binop exp
        {
        	PushFollow(FOLLOW_binop_in_synpred37_Lua983);
        	binop();
        	state.followingStackPointer--;
        	if (state.failed) return ;
        	PushFollow(FOLLOW_exp_in_synpred37_Lua985);
        	exp();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred37_Lua"

    // $ANTLR start "synpred53_Lua"
    public void synpred53_Lua_fragment() {
        Variable vs = default(Variable);


        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:341:38: (vs= varSuffix[true] )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:341:38: vs= varSuffix[true]
        {
        	PushFollow(FOLLOW_varSuffix_in_synpred53_Lua1111);
        	vs = varSuffix(true);
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred53_Lua"

    // $ANTLR start "synpred54_Lua"
    public void synpred54_Lua_fragment() {
        List<ValueReference> naa = default(List<ValueReference>);


        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:365:7: (naa= nameAndArgs )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:365:7: naa= nameAndArgs
        {
        	PushFollow(FOLLOW_nameAndArgs_in_synpred54_Lua1170);
        	naa = nameAndArgs();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred54_Lua"

    // $ANTLR start "synpred55_Lua"
    public void synpred55_Lua_fragment() {
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:378:24: ( nameAndArgs )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:378:24: nameAndArgs
        {
        	PushFollow(FOLLOW_nameAndArgs_in_synpred55_Lua1200);
        	nameAndArgs();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred55_Lua"

    // $ANTLR start "synpred56_Lua"
    public void synpred56_Lua_fragment() {
        Variable v = default(Variable);


        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:381:6: (v= var )
        // X:\\Documents\\projects\\WOW developing\\Components\\PSLib.Parsing\\PSLib.Parsing\\Lua\\Lua.g:381:6: v= var
        {
        	PushFollow(FOLLOW_var_in_synpred56_Lua1217);
        	v = var();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred56_Lua"

    // Delegated rules

   	public bool synpred14_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred14_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred7_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred7_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred53_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred53_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred56_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred56_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred54_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred54_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred55_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred55_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred8_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred8_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred6_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred6_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred37_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred37_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred27_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred27_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred1_Lua() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred1_Lua_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}


   	protected DFA7 dfa7;
   	protected DFA20 dfa20;
   	protected DFA24 dfa24;
   	protected DFA25 dfa25;
   	protected DFA26 dfa26;
	private void InitializeCyclicDFAs()
	{
    	this.dfa7 = new DFA7(this);
    	this.dfa20 = new DFA20(this);
    	this.dfa24 = new DFA24(this);
    	this.dfa25 = new DFA25(this);
    	this.dfa26 = new DFA26(this);
	    this.dfa7.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA7_SpecialStateTransition);
	    this.dfa20.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA20_SpecialStateTransition);
	    this.dfa24.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA24_SpecialStateTransition);
	    this.dfa25.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA25_SpecialStateTransition);
	    this.dfa26.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA26_SpecialStateTransition);
	}

    const string DFA7_eotS =
        "\x0d\uffff";
    const string DFA7_eofS =
        "\x0d\uffff";
    const string DFA7_minS =
        "\x01\x04\x02\x00\x05\uffff\x01\x00\x04\uffff";
    const string DFA7_maxS =
        "\x01\x3b\x02\x00\x05\uffff\x01\x00\x04\uffff";
    const string DFA7_acceptS =
        "\x03\uffff\x01\x03\x01\x04\x01\x05\x01\x06\x01\x07\x01\uffff\x01"+
        "\x08\x01\x01\x01\x02\x01\x09";
    const string DFA7_specialS =
        "\x01\uffff\x01\x00\x01\x01\x05\uffff\x01\x02\x04\uffff}>";
    static readonly string[] DFA7_transitionS = {
            "\x01\x01\x10\uffff\x01\x08\x01\uffff\x01\x09\x01\x07\x01\uffff"+
            "\x01\x03\x02\uffff\x01\x06\x05\uffff\x01\x05\x01\uffff\x01\x04"+
            "\x15\uffff\x01\x02",
            "\x01\uffff",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "\x01\uffff",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA7_eot = DFA.UnpackEncodedString(DFA7_eotS);
    static readonly short[] DFA7_eof = DFA.UnpackEncodedString(DFA7_eofS);
    static readonly char[] DFA7_min = DFA.UnpackEncodedStringToUnsignedChars(DFA7_minS);
    static readonly char[] DFA7_max = DFA.UnpackEncodedStringToUnsignedChars(DFA7_maxS);
    static readonly short[] DFA7_accept = DFA.UnpackEncodedString(DFA7_acceptS);
    static readonly short[] DFA7_special = DFA.UnpackEncodedString(DFA7_specialS);
    static readonly short[][] DFA7_transition = DFA.UnpackEncodedStringArray(DFA7_transitionS);

    protected class DFA7 : DFA
    {
        public DFA7(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 7;
            this.eot = DFA7_eot;
            this.eof = DFA7_eof;
            this.min = DFA7_min;
            this.max = DFA7_max;
            this.accept = DFA7_accept;
            this.special = DFA7_special;
            this.transition = DFA7_transition;

        }

        override public string Description
        {
            get { return "119:1: stat : ( var_assignment | functioncall | do_block | while_stat | repeat_stat | if_stat | for_stat | func_definition | var_definition );"; }
        }

    }


    protected internal int DFA7_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA7_1 = input.LA(1);

                   	 
                   	int index7_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_Lua()) ) { s = 10; }

                   	else if ( (synpred8_Lua()) ) { s = 11; }

                   	 
                   	input.Seek(index7_1);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA7_2 = input.LA(1);

                   	 
                   	int index7_2 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_Lua()) ) { s = 10; }

                   	else if ( (synpred8_Lua()) ) { s = 11; }

                   	 
                   	input.Seek(index7_2);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA7_8 = input.LA(1);

                   	 
                   	int index7_8 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred14_Lua()) ) { s = 9; }

                   	else if ( (true) ) { s = 12; }

                   	 
                   	input.Seek(index7_8);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae7 =
            new NoViableAltException(dfa.Description, 7, _s, input);
        dfa.Error(nvae7);
        throw nvae7;
    }
    const string DFA20_eotS =
        "\x0e\uffff";
    const string DFA20_eofS =
        "\x0e\uffff";
    const string DFA20_minS =
        "\x01\x04\x0b\x00\x02\uffff";
    const string DFA20_maxS =
        "\x01\x42\x0b\x00\x02\uffff";
    const string DFA20_acceptS =
        "\x0c\uffff\x01\x01\x01\x02";
    const string DFA20_specialS =
        "\x01\uffff\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x01\x05\x01"+
        "\x06\x01\x07\x01\x08\x01\x09\x01\x0a\x02\uffff}>";
    static readonly string[] DFA20_transitionS = {
            "\x01\x08\x04\x04\x03\x05\x0b\uffff\x01\x07\x10\uffff\x01\x01"+
            "\x01\x02\x01\x03\x01\x06\x01\uffff\x01\x0b\x0d\uffff\x01\x09"+
            "\x03\uffff\x01\x0a\x01\uffff\x02\x0b",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            ""
    };

    static readonly short[] DFA20_eot = DFA.UnpackEncodedString(DFA20_eotS);
    static readonly short[] DFA20_eof = DFA.UnpackEncodedString(DFA20_eofS);
    static readonly char[] DFA20_min = DFA.UnpackEncodedStringToUnsignedChars(DFA20_minS);
    static readonly char[] DFA20_max = DFA.UnpackEncodedStringToUnsignedChars(DFA20_maxS);
    static readonly short[] DFA20_accept = DFA.UnpackEncodedString(DFA20_acceptS);
    static readonly short[] DFA20_special = DFA.UnpackEncodedString(DFA20_specialS);
    static readonly short[][] DFA20_transition = DFA.UnpackEncodedStringArray(DFA20_transitionS);

    protected class DFA20 : DFA
    {
        public DFA20(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 20;
            this.eot = DFA20_eot;
            this.eof = DFA20_eof;
            this.min = DFA20_min;
            this.max = DFA20_max;
            this.accept = DFA20_accept;
            this.special = DFA20_special;
            this.transition = DFA20_transition;

        }

        override public string Description
        {
            get { return "()* loopback of 280:6: (e1= exp ',' )*"; }
        }

    }


    protected internal int DFA20_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA20_1 = input.LA(1);

                   	 
                   	int index20_1 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_1);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA20_2 = input.LA(1);

                   	 
                   	int index20_2 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_2);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA20_3 = input.LA(1);

                   	 
                   	int index20_3 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_3);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA20_4 = input.LA(1);

                   	 
                   	int index20_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_4);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 4 : 
                   	int LA20_5 = input.LA(1);

                   	 
                   	int index20_5 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_5);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 5 : 
                   	int LA20_6 = input.LA(1);

                   	 
                   	int index20_6 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_6);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 6 : 
                   	int LA20_7 = input.LA(1);

                   	 
                   	int index20_7 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_7);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 7 : 
                   	int LA20_8 = input.LA(1);

                   	 
                   	int index20_8 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_8);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 8 : 
                   	int LA20_9 = input.LA(1);

                   	 
                   	int index20_9 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_9);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 9 : 
                   	int LA20_10 = input.LA(1);

                   	 
                   	int index20_10 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_10);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 10 : 
                   	int LA20_11 = input.LA(1);

                   	 
                   	int index20_11 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred27_Lua()) ) { s = 12; }

                   	else if ( (true) ) { s = 13; }

                   	 
                   	input.Seek(index20_11);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae20 =
            new NoViableAltException(dfa.Description, 20, _s, input);
        dfa.Error(nvae20);
        throw nvae20;
    }
    const string DFA24_eotS =
        "\x1e\uffff";
    const string DFA24_eofS =
        "\x01\x01\x1d\uffff";
    const string DFA24_minS =
        "\x01\x04\x02\uffff\x04\x00\x17\uffff";
    const string DFA24_maxS =
        "\x01\x40\x02\uffff\x04\x00\x17\uffff";
    const string DFA24_acceptS =
        "\x01\uffff\x01\x02\x1a\uffff\x01\x01\x01\uffff";
    const string DFA24_specialS =
        "\x03\uffff\x01\x00\x01\x01\x01\x02\x01\x03\x17\uffff}>";
    static readonly string[] DFA24_transitionS = {
            "\x01\x01\x04\uffff\x03\x06\x08\uffff\x08\x01\x01\uffff\x09"+
            "\x01\x01\x1c\x01\x03\x04\uffff\x0f\x01\x01\x04\x01\x01\x01\x1c"+
            "\x01\x01\x01\x05\x01\x01",
            "",
            "",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA24_eot = DFA.UnpackEncodedString(DFA24_eotS);
    static readonly short[] DFA24_eof = DFA.UnpackEncodedString(DFA24_eofS);
    static readonly char[] DFA24_min = DFA.UnpackEncodedStringToUnsignedChars(DFA24_minS);
    static readonly char[] DFA24_max = DFA.UnpackEncodedStringToUnsignedChars(DFA24_maxS);
    static readonly short[] DFA24_accept = DFA.UnpackEncodedString(DFA24_acceptS);
    static readonly short[] DFA24_special = DFA.UnpackEncodedString(DFA24_specialS);
    static readonly short[][] DFA24_transition = DFA.UnpackEncodedStringArray(DFA24_transitionS);

    protected class DFA24 : DFA
    {
        public DFA24(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 24;
            this.eot = DFA24_eot;
            this.eof = DFA24_eof;
            this.min = DFA24_min;
            this.max = DFA24_max;
            this.accept = DFA24_accept;
            this.special = DFA24_special;
            this.transition = DFA24_transition;

        }

        override public string Description
        {
            get { return "()* loopback of 341:36: (vs= varSuffix[true] )*"; }
        }

    }


    protected internal int DFA24_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA24_3 = input.LA(1);

                   	 
                   	int index24_3 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred53_Lua()) ) { s = 28; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index24_3);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA24_4 = input.LA(1);

                   	 
                   	int index24_4 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred53_Lua()) ) { s = 28; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index24_4);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA24_5 = input.LA(1);

                   	 
                   	int index24_5 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred53_Lua()) ) { s = 28; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index24_5);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA24_6 = input.LA(1);

                   	 
                   	int index24_6 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred53_Lua()) ) { s = 28; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index24_6);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae24 =
            new NoViableAltException(dfa.Description, 24, _s, input);
        dfa.Error(nvae24);
        throw nvae24;
    }
    const string DFA25_eotS =
        "\x1b\uffff";
    const string DFA25_eofS =
        "\x01\x01\x1a\uffff";
    const string DFA25_minS =
        "\x01\x04\x0d\uffff\x01\x00\x0c\uffff";
    const string DFA25_maxS =
        "\x01\x40\x0d\uffff\x01\x00\x0c\uffff";
    const string DFA25_acceptS =
        "\x01\uffff\x01\x02\x16\uffff\x01\x01\x02\uffff";
    const string DFA25_specialS =
        "\x0e\uffff\x01\x00\x0c\uffff}>";
    static readonly string[] DFA25_transitionS = {
            "\x01\x01\x04\uffff\x03\x18\x08\uffff\x02\x01\x01\uffff\x05"+
            "\x01\x01\uffff\x09\x01\x01\uffff\x01\x18\x04\uffff\x0f\x01\x01"+
            "\x0e\x01\x01\x01\uffff\x01\x01\x01\x18\x01\x01",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA25_eot = DFA.UnpackEncodedString(DFA25_eotS);
    static readonly short[] DFA25_eof = DFA.UnpackEncodedString(DFA25_eofS);
    static readonly char[] DFA25_min = DFA.UnpackEncodedStringToUnsignedChars(DFA25_minS);
    static readonly char[] DFA25_max = DFA.UnpackEncodedStringToUnsignedChars(DFA25_maxS);
    static readonly short[] DFA25_accept = DFA.UnpackEncodedString(DFA25_acceptS);
    static readonly short[] DFA25_special = DFA.UnpackEncodedString(DFA25_specialS);
    static readonly short[][] DFA25_transition = DFA.UnpackEncodedStringArray(DFA25_transitionS);

    protected class DFA25 : DFA
    {
        public DFA25(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 25;
            this.eot = DFA25_eot;
            this.eof = DFA25_eof;
            this.min = DFA25_min;
            this.max = DFA25_max;
            this.accept = DFA25_accept;
            this.special = DFA25_special;
            this.transition = DFA25_transition;

        }

        override public string Description
        {
            get { return "()* loopback of 365:6: (naa= nameAndArgs )*"; }
        }

    }


    protected internal int DFA25_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA25_14 = input.LA(1);

                   	 
                   	int index25_14 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred54_Lua()) ) { s = 24; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index25_14);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae25 =
            new NoViableAltException(dfa.Description, 25, _s, input);
        dfa.Error(nvae25);
        throw nvae25;
    }
    const string DFA26_eotS =
        "\x15\uffff";
    const string DFA26_eofS =
        "\x01\x01\x14\uffff";
    const string DFA26_minS =
        "\x01\x04\x09\uffff\x01\x00\x0a\uffff";
    const string DFA26_maxS =
        "\x01\x3f\x09\uffff\x01\x00\x0a\uffff";
    const string DFA26_acceptS =
        "\x01\uffff\x01\x02\x10\uffff\x01\x01\x02\uffff";
    const string DFA26_specialS =
        "\x0a\uffff\x01\x00\x0a\uffff}>";
    static readonly string[] DFA26_transitionS = {
            "\x01\x01\x04\uffff\x03\x12\x08\uffff\x02\x01\x01\uffff\x02"+
            "\x01\x01\uffff\x02\x01\x01\uffff\x01\x01\x01\uffff\x07\x01\x01"+
            "\uffff\x01\x12\x13\uffff\x01\x0a\x03\uffff\x01\x12",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA26_eot = DFA.UnpackEncodedString(DFA26_eotS);
    static readonly short[] DFA26_eof = DFA.UnpackEncodedString(DFA26_eofS);
    static readonly char[] DFA26_min = DFA.UnpackEncodedStringToUnsignedChars(DFA26_minS);
    static readonly char[] DFA26_max = DFA.UnpackEncodedStringToUnsignedChars(DFA26_maxS);
    static readonly short[] DFA26_accept = DFA.UnpackEncodedString(DFA26_acceptS);
    static readonly short[] DFA26_special = DFA.UnpackEncodedString(DFA26_specialS);
    static readonly short[][] DFA26_transition = DFA.UnpackEncodedStringArray(DFA26_transitionS);

    protected class DFA26 : DFA
    {
        public DFA26(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 26;
            this.eot = DFA26_eot;
            this.eof = DFA26_eof;
            this.min = DFA26_min;
            this.max = DFA26_max;
            this.accept = DFA26_accept;
            this.special = DFA26_special;
            this.transition = DFA26_transition;

        }

        override public string Description
        {
            get { return "()+ loopback of 378:24: ( nameAndArgs )+"; }
        }

    }


    protected internal int DFA26_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA26_10 = input.LA(1);

                   	 
                   	int index26_10 = input.Index();
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred55_Lua()) ) { s = 18; }

                   	else if ( (true) ) { s = 1; }

                   	 
                   	input.Seek(index26_10);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae26 =
            new NoViableAltException(dfa.Description, 26, _s, input);
        dfa.Error(nvae26);
        throw nvae26;
    }
 

    public static readonly BitSet FOLLOW_chunk_in_program120 = new BitSet(new ulong[]{0x0000000000000000UL});
    public static readonly BitSet FOLLOW_EOF_in_program127 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_stat_in_chunk135 = new BitSet(new ulong[]{0x0800002E25B00012UL});
    public static readonly BitSet FOLLOW_20_in_chunk138 = new BitSet(new ulong[]{0x0800002E25B00012UL});
    public static readonly BitSet FOLLOW_laststat_in_chunk145 = new BitSet(new ulong[]{0x0000000000100002UL});
    public static readonly BitSet FOLLOW_20_in_chunk148 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_chunk_in_block163 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_var_assignment_in_stat176 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_functioncall_in_stat182 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_do_block_in_stat189 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_while_stat_in_stat195 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_repeat_stat_in_stat201 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_if_stat_in_stat207 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_for_stat_in_stat213 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_func_definition_in_stat219 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_var_definition_in_stat225 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_21_in_var_definition234 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_namelist_in_var_definition238 = new BitSet(new ulong[]{0x0000000000400002UL});
    public static readonly BitSet FOLLOW_22_in_var_definition241 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_explist1_in_var_definition245 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_varlist1_in_var_assignment265 = new BitSet(new ulong[]{0x0000000000400000UL});
    public static readonly BitSet FOLLOW_22_in_var_assignment267 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_explist1_in_var_assignment271 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_21_in_func_definition293 = new BitSet(new ulong[]{0x0000000000800000UL});
    public static readonly BitSet FOLLOW_23_in_func_definition295 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_NAME_in_func_definition299 = new BitSet(new ulong[]{0x0800000000000000UL});
    public static readonly BitSet FOLLOW_func_body_in_func_definition319 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_23_in_func_definition338 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_funcname_in_func_definition342 = new BitSet(new ulong[]{0x0800000000000000UL});
    public static readonly BitSet FOLLOW_func_body_in_func_definition359 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_24_in_for_stat376 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_NAME_in_for_stat380 = new BitSet(new ulong[]{0x0000000000400000UL});
    public static readonly BitSet FOLLOW_22_in_for_stat382 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_for_stat386 = new BitSet(new ulong[]{0x0000000002000000UL});
    public static readonly BitSet FOLLOW_25_in_for_stat388 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_for_stat390 = new BitSet(new ulong[]{0x0000000006000000UL});
    public static readonly BitSet FOLLOW_25_in_for_stat393 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_for_stat395 = new BitSet(new ulong[]{0x0000000004000000UL});
    public static readonly BitSet FOLLOW_26_in_for_stat399 = new BitSet(new ulong[]{0x0800002E2DB00010UL});
    public static readonly BitSet FOLLOW_block_in_for_stat415 = new BitSet(new ulong[]{0x0000000008000000UL});
    public static readonly BitSet FOLLOW_27_in_for_stat431 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_24_in_for_stat441 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_namelist_in_for_stat445 = new BitSet(new ulong[]{0x0000000010000000UL});
    public static readonly BitSet FOLLOW_28_in_for_stat447 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_explist1_in_for_stat449 = new BitSet(new ulong[]{0x0000000004000000UL});
    public static readonly BitSet FOLLOW_26_in_for_stat451 = new BitSet(new ulong[]{0x0800002E2DB00010UL});
    public static readonly BitSet FOLLOW_block_in_for_stat468 = new BitSet(new ulong[]{0x0000000008000000UL});
    public static readonly BitSet FOLLOW_27_in_for_stat472 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_29_in_if_stat485 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_if_stat487 = new BitSet(new ulong[]{0x0000000040000000UL});
    public static readonly BitSet FOLLOW_30_in_if_stat489 = new BitSet(new ulong[]{0x0800002FADB00010UL});
    public static readonly BitSet FOLLOW_block_in_if_stat493 = new BitSet(new ulong[]{0x0000000188000000UL});
    public static readonly BitSet FOLLOW_31_in_if_stat498 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_if_stat500 = new BitSet(new ulong[]{0x0000000040000000UL});
    public static readonly BitSet FOLLOW_30_in_if_stat502 = new BitSet(new ulong[]{0x0800002FADB00010UL});
    public static readonly BitSet FOLLOW_block_in_if_stat506 = new BitSet(new ulong[]{0x0000000188000000UL});
    public static readonly BitSet FOLLOW_32_in_if_stat513 = new BitSet(new ulong[]{0x0800002E2DB00010UL});
    public static readonly BitSet FOLLOW_block_in_if_stat517 = new BitSet(new ulong[]{0x0000000008000000UL});
    public static readonly BitSet FOLLOW_27_in_if_stat523 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_33_in_laststat531 = new BitSet(new ulong[]{0x88002F0000800FF2UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_explist1_in_laststat534 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_34_in_laststat540 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_35_in_repeat_stat548 = new BitSet(new ulong[]{0x0800003E25B00010UL});
    public static readonly BitSet FOLLOW_block_in_repeat_stat552 = new BitSet(new ulong[]{0x0000001000000000UL});
    public static readonly BitSet FOLLOW_36_in_repeat_stat556 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_repeat_stat558 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_37_in_while_stat567 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_while_stat569 = new BitSet(new ulong[]{0x0000000004000000UL});
    public static readonly BitSet FOLLOW_26_in_while_stat571 = new BitSet(new ulong[]{0x0800002E2DB00010UL});
    public static readonly BitSet FOLLOW_block_in_while_stat575 = new BitSet(new ulong[]{0x0000000008000000UL});
    public static readonly BitSet FOLLOW_27_in_while_stat579 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_26_in_do_block587 = new BitSet(new ulong[]{0x0800002E2DB00010UL});
    public static readonly BitSet FOLLOW_block_in_do_block591 = new BitSet(new ulong[]{0x0000000008000000UL});
    public static readonly BitSet FOLLOW_27_in_do_block595 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_var_in_varlist1617 = new BitSet(new ulong[]{0x0000000002000002UL});
    public static readonly BitSet FOLLOW_25_in_varlist1630 = new BitSet(new ulong[]{0x0800000000000010UL});
    public static readonly BitSet FOLLOW_var_in_varlist1634 = new BitSet(new ulong[]{0x0000000002000002UL});
    public static readonly BitSet FOLLOW_NAME_in_funcname670 = new BitSet(new ulong[]{0x000000C000000002UL});
    public static readonly BitSet FOLLOW_38_in_funcname683 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_NAME_in_funcname687 = new BitSet(new ulong[]{0x000000C000000002UL});
    public static readonly BitSet FOLLOW_39_in_funcname702 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_NAME_in_funcname706 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_NAME_in_namelist747 = new BitSet(new ulong[]{0x0000000002000002UL});
    public static readonly BitSet FOLLOW_25_in_namelist761 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_NAME_in_namelist765 = new BitSet(new ulong[]{0x0000000002000002UL});
    public static readonly BitSet FOLLOW_exp_in_explist1805 = new BitSet(new ulong[]{0x0000000002000000UL});
    public static readonly BitSet FOLLOW_25_in_explist1819 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_explist1825 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_40_in_exp861 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_41_in_exp872 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_42_in_exp885 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_number_in_exp899 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_stringToken_in_exp913 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_43_in_exp926 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_function_in_exp936 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_prefixexp_in_exp950 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_tableconstructor_in_exp964 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_unop_in_exp974 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_exp976 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_binop_in_exp983 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_exp985 = new BitSet(new ulong[]{0x07FFF00000000002UL});
    public static readonly BitSet FOLLOW_set_in_binop0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_NAME_in_var1084 = new BitSet(new ulong[]{0xA80000C000000E02UL});
    public static readonly BitSet FOLLOW_59_in_var1096 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_var1098 = new BitSet(new ulong[]{0x1000000000000000UL});
    public static readonly BitSet FOLLOW_60_in_var1100 = new BitSet(new ulong[]{0xA80000C000000E00UL});
    public static readonly BitSet FOLLOW_varSuffix_in_var1102 = new BitSet(new ulong[]{0xA80000C000000E02UL});
    public static readonly BitSet FOLLOW_varSuffix_in_var1111 = new BitSet(new ulong[]{0xA80000C000000E02UL});
    public static readonly BitSet FOLLOW_varOrExp_in_prefixexp1153 = new BitSet(new ulong[]{0x8800008000000E02UL});
    public static readonly BitSet FOLLOW_nameAndArgs_in_prefixexp1170 = new BitSet(new ulong[]{0x8800008000000E02UL});
    public static readonly BitSet FOLLOW_varOrExp_in_functioncall1198 = new BitSet(new ulong[]{0x8800008000000E00UL});
    public static readonly BitSet FOLLOW_nameAndArgs_in_functioncall1200 = new BitSet(new ulong[]{0x8800008000000E02UL});
    public static readonly BitSet FOLLOW_var_in_varOrExp1217 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_59_in_varOrExp1232 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_varOrExp1236 = new BitSet(new ulong[]{0x1000000000000000UL});
    public static readonly BitSet FOLLOW_60_in_varOrExp1238 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_39_in_nameAndArgs1265 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_NAME_in_nameAndArgs1269 = new BitSet(new ulong[]{0x8800008000000E00UL});
    public static readonly BitSet FOLLOW_args_in_nameAndArgs1274 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_nameAndArgs_in_varSuffix1302 = new BitSet(new ulong[]{0xA80000C000000E00UL});
    public static readonly BitSet FOLLOW_61_in_varSuffix1311 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_varSuffix1315 = new BitSet(new ulong[]{0x4000000000000000UL});
    public static readonly BitSet FOLLOW_62_in_varSuffix1317 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_38_in_varSuffix1330 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_NAME_in_varSuffix1334 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_59_in_args1360 = new BitSet(new ulong[]{0x98002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_explist1_in_args1363 = new BitSet(new ulong[]{0x1000000000000000UL});
    public static readonly BitSet FOLLOW_60_in_args1367 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_tableconstructor_in_args1371 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_stringToken_in_args1375 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_23_in_function1388 = new BitSet(new ulong[]{0x0800000000000000UL});
    public static readonly BitSet FOLLOW_func_body_in_function1392 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_59_in_func_body1412 = new BitSet(new ulong[]{0x1000080000000010UL});
    public static readonly BitSet FOLLOW_func_parlist_in_func_body1417 = new BitSet(new ulong[]{0x1000000000000000UL});
    public static readonly BitSet FOLLOW_60_in_func_body1422 = new BitSet(new ulong[]{0x0800002E2DB00010UL});
    public static readonly BitSet FOLLOW_block_in_func_body1424 = new BitSet(new ulong[]{0x0000000008000000UL});
    public static readonly BitSet FOLLOW_27_in_func_body1426 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_namelist_in_func_parlist1453 = new BitSet(new ulong[]{0x0000000002000002UL});
    public static readonly BitSet FOLLOW_25_in_func_parlist1468 = new BitSet(new ulong[]{0x0000080000000000UL});
    public static readonly BitSet FOLLOW_43_in_func_parlist1470 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_43_in_func_parlist1478 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_63_in_tableconstructor1501 = new BitSet(new ulong[]{0xA8002F0000800FF0UL,0x0000000000000007UL});
    public static readonly BitSet FOLLOW_fieldlist_in_tableconstructor1506 = new BitSet(new ulong[]{0x0000000000000000UL,0x0000000000000001UL});
    public static readonly BitSet FOLLOW_64_in_tableconstructor1510 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_field_in_fieldlist1541 = new BitSet(new ulong[]{0x0000000002100002UL});
    public static readonly BitSet FOLLOW_fieldsep_in_fieldlist1554 = new BitSet(new ulong[]{0xA8002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_field_in_fieldlist1558 = new BitSet(new ulong[]{0x0000000002100002UL});
    public static readonly BitSet FOLLOW_fieldsep_in_fieldlist1573 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_61_in_field1596 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_field1600 = new BitSet(new ulong[]{0x4000000000000000UL});
    public static readonly BitSet FOLLOW_62_in_field1602 = new BitSet(new ulong[]{0x0000000000400000UL});
    public static readonly BitSet FOLLOW_22_in_field1604 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_field1608 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_NAME_in_field1624 = new BitSet(new ulong[]{0x0000000000400000UL});
    public static readonly BitSet FOLLOW_22_in_field1626 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_field1630 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_exp_in_field1646 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_fieldsep0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_unop0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_number0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_stringToken0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_chunk_in_synpred1_Lua120 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_chunk_in_synpred6_Lua163 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_var_assignment_in_synpred7_Lua176 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_functioncall_in_synpred8_Lua182 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_func_definition_in_synpred14_Lua219 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_exp_in_synpred27_Lua805 = new BitSet(new ulong[]{0x0000000002000000UL});
    public static readonly BitSet FOLLOW_25_in_synpred27_Lua819 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_binop_in_synpred37_Lua983 = new BitSet(new ulong[]{0x88002F0000800FF0UL,0x0000000000000006UL});
    public static readonly BitSet FOLLOW_exp_in_synpred37_Lua985 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_varSuffix_in_synpred53_Lua1111 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_nameAndArgs_in_synpred54_Lua1170 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_nameAndArgs_in_synpred55_Lua1200 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_var_in_synpred56_Lua1217 = new BitSet(new ulong[]{0x0000000000000002UL});

}
}